abs

fun abs(x: Half): Half

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

Returns the absolute value of the given quaternion q.


inline fun abs(v: Float2): Float2
inline fun abs(v: Float3): Float3
inline fun abs(v: Float4): Float4
inline fun abs(v: Half3): Half3
inline fun abs(v: Half4): Half4
inline fun abs(v: Int3): Int3
inline fun abs(v: Int4): Int4