floor

fun floor(x: Half): Half(source)

Returns the largest half-precision float value toward positive infinity less than or equal to the specified half-precision float value. Special values are handled in the following ways:

  • If the specified half-precision float is NaN, the result is NaN

  • If the specified half-precision float is infinity (negative or positive), the result is infinity (with the same sign)

  • If the specified half-precision float is zero (negative or positive), the result is zero (with the same sign)

Return

The largest half-precision float value toward positive infinity less than or equal to the specified half-precision float value

Parameters

x

A half-precision float value