Author: toad
Date: 2008-04-08 11:07:17 +0000 (Tue, 08 Apr 2008)
New Revision: 19069

Modified:
   trunk/freenet/src/freenet/node/LocationManager.java
Log:
Change locs-are-the-same threshold from Double.MIN_VALUE to Double.MIN_VALUE*2

Modified: trunk/freenet/src/freenet/node/LocationManager.java
===================================================================
--- trunk/freenet/src/freenet/node/LocationManager.java 2008-04-08 11:05:18 UTC 
(rev 19068)
+++ trunk/freenet/src/freenet/node/LocationManager.java 2008-04-08 11:07:17 UTC 
(rev 19069)
@@ -725,22 +725,22 @@

         double A = 1.0;
         for(int i=0;i<friendLocs.length;i++) {
-            if(Math.abs(friendLocs[i] - myLoc) <= Double.MIN_VALUE) continue;
+            if(Math.abs(friendLocs[i] - myLoc) <= Double.MIN_VALUE*2) continue;
             A *= Location.distance(friendLocs[i], myLoc);
         }
         for(int i=0;i<hisFriendLocs.length;i++) {
-            if(Math.abs(hisFriendLocs[i] - hisLoc) <= Double.MIN_VALUE) 
continue;
+            if(Math.abs(hisFriendLocs[i] - hisLoc) <= Double.MIN_VALUE*2) 
continue;
             A *= Location.distance(hisFriendLocs[i], hisLoc);
         }

         // B = the same, with our two values swapped
         double B = 1.0;
         for(int i=0;i<friendLocs.length;i++) {
-            if(Math.abs(friendLocs[i] - hisLoc) <= Double.MIN_VALUE) continue;
+            if(Math.abs(friendLocs[i] - hisLoc) <= Double.MIN_VALUE*2) 
continue;
             B *= Location.distance(friendLocs[i], hisLoc);
         }
         for(int i=0;i<hisFriendLocs.length;i++) {
-            if(Math.abs(hisFriendLocs[i] - myLoc) <= Double.MIN_VALUE) 
continue;
+            if(Math.abs(hisFriendLocs[i] - myLoc) <= Double.MIN_VALUE*2) 
continue;
             B *= Location.distance(hisFriendLocs[i], myLoc);
         }



Reply via email to