h
Converts this double-precision float value into a half-precision float value. The following special cases are handled:
If the input is NaN (see Double.isNaN), the returned value is Half.NaN
If the input is Double.POSITIVE_INFINITY or Double.NEGATIVE_INFINITY, the returned value is respectively Half.POSITIVE_INFINITY or Half.NEGATIVE_INFINITY
If the input is 0 (positive or negative), the returned value is Half.POSITIVE_ZERO or Half.NEGATIVE_ZERO
If the input is less than Half.MIN_VALUE, the returned value is flushed to Half.POSITIVE_ZERO or Half.NEGATIVE_ZERO
If the input is less than Half.MIN_NORMAL, the returned value is a denormal half-precision float
Otherwise, the returned value is rounded to the nearest representable half-precision float value
Return
A half-precision float value
Converts this single-precision float value into a half-precision float value. The following special cases are handled:
If the input is NaN (see Float.isNaN), the returned value is Half.NaN
If the input is Float.POSITIVE_INFINITY or Float.NEGATIVE_INFINITY, the returned value is respectively Half.POSITIVE_INFINITY or Half.NEGATIVE_INFINITY
If the input is 0 (positive or negative), the returned value is Half.POSITIVE_ZERO or Half.NEGATIVE_ZERO
If the input is less than Half.MIN_VALUE, the returned value is flushed to Half.POSITIVE_ZERO or Half.NEGATIVE_ZERO
If the input is less than Half.MIN_NORMAL, the returned value is a denormal half-precision float
Otherwise, the returned value is rounded to the nearest representable half-precision float value
Return
A half-precision float value