On Tuesday 15 April 2008 09:28, Michael Rogers wrote:
> Daniel Cheng wrote:
> >  750             if(Math.abs(friendLocs[i] - myLoc) <=
> > Double.MIN_VALUE*2) continue;
> 
> What's the purpose of this check and why does it use Math.abs instead of 
> Location.distance?

To prevent unjustified zeros when there is a race condition or other error 
causing there to be two nodes with the same location (e.g. when a swap ends 
up swapping with a direct peer).
> 
> Cheers,
> Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/tech/attachments/20080415/9a1ac4b1/attachment.pgp>

Reply via email to