Author: ruschein
Date: 2010-06-15 14:22:51 -0700 (Tue, 15 Jun 2010)
New Revision: 20548

Modified:
   cytoscape/trunk/src/cytoscape/util/MathUtil.java
Log:
Tightened up the spec for what almosty equals means for double precision 
floating point numbers.

Modified: cytoscape/trunk/src/cytoscape/util/MathUtil.java
===================================================================
--- cytoscape/trunk/src/cytoscape/util/MathUtil.java    2010-06-15 21:21:07 UTC 
(rev 20547)
+++ cytoscape/trunk/src/cytoscape/util/MathUtil.java    2010-06-15 21:22:51 UTC 
(rev 20548)
@@ -56,8 +56,8 @@
                final double absX2 = Math.abs(x2);
 
                if (x1 != 0.0)
-                       return Math.abs(x1 - x2) / Math.abs(x1) < 1.0e-10;
+                       return Math.abs(x1 - x2) / Math.abs(x1) < 1.0e-12;
                else
-                       return Math.abs(x1 - x2) / Math.abs(x2) < 1.0e-10;
+                       return Math.abs(x1 - x2) / Math.abs(x2) < 1.0e-12;
        }
 }
\ No newline at end of file

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to