abs

fun abs(x: Half): Half(source)

Returns the absolute value of the specified half-precision float. 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 zero (negative or positive), the result is positive zero (see POSITIVE_ZERO)

  • If the specified half-precision float is infinity (negative or positive), the result is positive infinity (see POSITIVE_INFINITY)

Return

The absolute value of the specified half-precision float


inline fun abs(q: Quaternion): Quaternion(source)
inline fun abs(v: Float2): Float2(source)
inline fun abs(v: Float3): Float3(source)
inline fun abs(v: Float4): Float4(source)
inline fun abs(v: Half3): Half3(source)
inline fun abs(v: Half4): Half4(source)