@ Pure public static int epsilonCompareToDistance ( double distance1 , double distance2 ) { final double min = distance2 - distancePrecision ; final double max = distance2 + distancePrecision ; if ( distance1 >= min && distance1 <= max ) { return 0 ; } if ( distance1 < min ) { return - 1 ; } return 1 ; }
Replies if the specified distances are approximatively equal less or greater than .