private static boolean isDoubleEqual(double value,double valueToCompare){
  return (Math.abs(value - valueToCompare) < 0.001);
}

private static boolean isDoubleEqual ( double value , double valueToCompare ) { return ( Math . abs ( value - valueToCompare ) < 0.001 ) ; }
checks if is double values are equal .
