private static boolean isClose(float value,float targetValue){
  return Math.abs(value - targetValue) < 0.001f;
}

private static boolean isClose ( float value , float targetValue ) { return Math . abs ( value - targetValue ) < 0.001f ; }
returns true if value is close to target value .
