Java Utililty Methods Float to Short

List of utility methods to do Float to Short

Description

The list of methods to do Float to Short are organized into topic(s).

Method

ShortfloatToShort(final float value)
float To Short
return (short) value;
ShortfloatToShort(float f)
float To Short
if (f >= Short.MIN_VALUE && f <= Short.MAX_VALUE) {
    return (short) f;
return null;
short[]floatToShort(float[] values)
float To Short
if (values == null) {
    return null;
short[] results = new short[values.length];
for (int i = 0; i < values.length; i++) {
    results[i] = (short) values[i];
return results;
...