[chronojump] SimilarDouble more strict, changed <0.1 to <0.001



commit fe4918d64343f467d51846c10fe062c49f6d5c6b
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Mar 12 17:13:06 2018 +0100

    SimilarDouble more strict, changed <0.1 to <0.001

 src/util.cs |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/util.cs b/src/util.cs
index 9bfb008..e544d20 100644
--- a/src/util.cs
+++ b/src/util.cs
@@ -32,11 +32,11 @@ public class Util
 {
        /*
         * sometimes two doubles are similar "human eye" but different when they are compared with equal
-        * just return true if the difference between them is lower than 0.1
+        * just return true if the difference between them is lower than 0.001
         */
        public static bool SimilarDouble (double a, double b)
        {
-               if(Math.Abs(a - b) < 0.1)
+               if(Math.Abs(a - b) < 0.001)
                        return true;
 
                return false;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]