public static boolean equal(double a,double b,double distance){
  return (Math.abs(a - b) < distance);
}

public static boolean equal ( double a , double b , double distance ) { return ( Math . abs ( a - b ) < distance ) ; }
returns if two double values are equal to within a distance .
