public static int ceil_int(final float a){
  final int intpart=(int)a;
  if (a <= intpart || (CHECK_OVERFLOW && intpart == Integer.MAX_VALUE) || CHECK_NAN && Float.isNaN(a)) {
    return intpart;
  }
  return intpart + 1;
}

public static int ceil_int ( final float a ) { final int intpart = ( int ) a ; if ( a <= intpart || ( CHECK_OVERFLOW && intpart == Integer . MAX_VALUE ) || CHECK_NAN && Float . isNaN ( a ) ) { return intpart ; } return intpart + 1 ; }
faster alternative to ceil ( float ) optimized for the integer domain and supporting nan and + / - infinity .
