MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / v_norm2_safe

Function v_norm2_safe

include/vecmath/dag_vecMath_common.h:275–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273 return v_sel(v_div(a, len), def, v_is_unsafe_positive_divisor(lenSq));
274}
275VECTORCALL VECMATH_FINLINE vec4f v_norm2_safe(vec4f a, vec4f def)
276{
277 vec4f lenSq = v_length2_sq(a);
278 vec4f len = v_splat_x(v_sqrt_x(lenSq));
279 return v_sel(v_div(a, len), def, v_is_unsafe_positive_divisor(lenSq));
280}
281
282VECTORCALL VECMATH_FINLINE vec3f v_cross3(vec3f a, vec3f b)
283{

Callers 1

safe_normalize2Function · 0.85

Calls 6

v_length2_sqFunction · 0.70
v_splat_xFunction · 0.70
v_sqrt_xFunction · 0.70
v_selFunction · 0.70
v_divFunction · 0.70

Tested by

no test coverage detected