List of utility methods to do Double Number Equal
boolean | doubleEqualsWithTolerance(double a, double b, long maxFloatsBetween) double Equals With Tolerance if (a == b) return true; if (Math.abs(Double.doubleToLongBits(a) - Double.doubleToLongBits(b)) <= maxFloatsBetween) return true; if (Double.doubleToLongBits(Math.abs(a - b)) <= maxFloatsBetween) return true; return false; |