Revision: 20645
          http://sourceforge.net/p/jmol/code/20645
Author:   hansonr
Date:     2015-07-08 16:15:03 +0000 (Wed, 08 Jul 2015)
Log Message:
-----------
M4.round(f); change in return from SmilesMatcher.find from bs[][] to int[][]

Modified Paths:
--------------
    trunk/Jmol/src/JmolSmilesApplet.java
    trunk/Jmol/src/javajs/util/M4.java

Modified: trunk/Jmol/src/JmolSmilesApplet.java
===================================================================
--- trunk/Jmol/src/JmolSmilesApplet.java        2015-07-08 16:00:37 UTC (rev 
20644)
+++ trunk/Jmol/src/JmolSmilesApplet.java        2015-07-08 16:15:03 UTC (rev 
20645)
@@ -89,7 +89,7 @@
     int ret = -1;
     try {
       SmilesMatcher sm = new SmilesMatcher();
-      BS[] result = sm.find(pattern, smiles, isSmarts, !isAll);
+      int[][] result = sm.find(pattern, smiles, isSmarts, !isAll);
       ret = (result == null ? -1 : result.length);
     } catch (Exception e) {
       System.out.println(e.getMessage());

Modified: trunk/Jmol/src/javajs/util/M4.java
===================================================================
--- trunk/Jmol/src/javajs/util/M4.java  2015-07-08 16:00:37 UTC (rev 20644)
+++ trunk/Jmol/src/javajs/util/M4.java  2015-07-08 16:15:03 UTC (rev 20645)
@@ -917,5 +917,27 @@
         + m20 + "\t" + m21 + "\t" + m22 + "\t" + m23 + "]" + "\n  [" + m30
         + "\t" + m31 + "\t" + m32 + "\t" + m33 + "] ]";
   }
+  public M4 round(float f) {
+    m00 = rnd(m00, f);
+    m01 = rnd(m01, f);
+    m02 = rnd(m02, f);
+    m03 = rnd(m03, f);
+    m10 = rnd(m10, f);
+    m11 = rnd(m11, f);
+    m12 = rnd(m12, f);
+    m13 = rnd(m13, f);
+    m20 = rnd(m20, f);
+    m21 = rnd(m21, f);
+    m22 = rnd(m22, f);
+    m23 = rnd(m23, f);
+    m30 = rnd(m30, f);
+    m31 = rnd(m31, f);
+    m32 = rnd(m32, f);
+    m33 = rnd(m33, f);
+    return this;
+  }
 
+  private float rnd(float n, float f) {
+    return (Math.abs(n) < f ? 0 : n);
+  }
 }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to