private static boolean within(final float first,final float second,final float variance){
  return second > first - variance && second < first + variance;
}

private static boolean within ( final float first , final float second , final float variance ) { return second > first - variance && second < first + variance ; }
this will determine of two floating point numbers are within a specified variance .
