public static float checkArgumentFinite ( final float value , final String valueName ) { if ( Float . isNaN ( value ) ) { throw new IllegalArgumentException ( valueName + " must not be NaN" ) ; } else if ( Float . isInfinite ( value ) ) { throw new IllegalArgumentException ( valueName + " must not be infinite" ) ; } return value ; }
Ensures that the argument floating point value is a finite number .