13template<
typename VecT> VecT
safe_mod(VecT a, VecT
b)
114 return (
b != 0.0f) ? (a /
b) :
float2(0);
118 return (
b != 0.0f) ? (a /
b) :
float3(0);
122 return (
b != 0.0f) ? (a /
b) :
float4(0);
131 constexpr float threshold = 1e-35f;
134 out_length = 1.0f / length_inv;
135 return vector * length_inv;
139 VecT result = VecT(0.0f);
152 float unused_length = 0.0f;
165 constexpr float threshold = 1e-35f;
246 wrap(a.
x,
b.x, c.
x),
wrap(a.
y,
b.y, c.
y),
wrap(a.
z,
b.z, c.
z),
wrap(a.
w,
b.w, c.
w));
VecBase< bool, D > notEqual(VecOp< T, D >, VecOp< T, D >) RET
float dot(VecOp< float, D >, VecOp< float, D >) RET
constexpr T inversesqrt(T) RET
VecBase< float, D > constexpr mod(VecOp< float, D >, VecOp< float, D >) RET
float wrap(float a, float b, float c)
float fallback_pow(float x, float y, float fallback)
float safe_divide(float a, float b)
float compatible_pow(float x, float y)
float safe_mod(float a, float b)
float compatible_mod(float a, float b)
float length_squared(VecT a)
VecT safe_normalize(VecT vector)
VecT normalize_fallback(VecT vector, VecT fallback)
VecT safe_normalize_and_get_length(VecT vector, float &out_length)