public static boolean almostEqual(double a,double b,double delta){
  return Math.abs(a - b) <= delta;
}

public static boolean almostEqual ( double a , double b , double delta ) { return Math . abs ( a - b ) <= delta ; }
check whether two floating point values match with a given precision .
