toShortValue

Converts a double to a short. If the double is outside the natural range, then the value is set to the minimum or maximum of the range. If within the range, the value is rounded to the nearest value. For example, 4.9999 is rounded to 5.0.

Return

the converted value

Parameters

value

the value to convert