Java Utililty Methods Double to Short

List of utility methods to do Double to Short

Description

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

Method

ShortdoubleToShort(double d)
double To Short
if (d >= Short.MIN_VALUE && d <= Short.MAX_VALUE) {
    return (short) d;
return null;
short[]doubleToShort(double[] values)
double 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;
...
ShortdoubleToShort(final double value)
double To Short
return (short) value;
intdoubleToShortBits(double d)
Turns a double-precision floating point integer into an integer.
long l = Double.doubleToLongBits(d);
return (int) (l >> 48);