Template Function TRAP::Math::Sign(const Vec<L, T>&)#

Function Documentation#

template<u32 L, typename T>
constexpr Vec<L, T> TRAP::Math::Sign(const Vec<L, T> &x)#

Extract the sign of x.

Parameters:

x – Specify the value from which to extract the sign.

Returns:

1.0f if x > 0, 0.0 if x == 0, or -1.0 if x < 0.