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

Function v_dir_to_angles

include/vecmath/dag_vecMath_trig.h:69–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69VECTORCALL VECMATH_FINLINE vec4f v_dir_to_angles(vec3f dir)
70{
71 vec4f z = v_splat_z(dir);
72 vec4f d = v_length2_x(v_perm_xzxz(dir));
73 vec4f y = v_perm_xaxa(z, v_splat_y(dir));
74 vec4f x = v_perm_xaxa(dir, d);
75 vec4f a = v_atan2(y, x);
76 return v_xor(a, v_cast_vec4f(v_seti_x(0x80000000)));
77}
78
79VECTORCALL VECMATH_FINLINE vec3f v_angles_to_dir(vec4f angles)
80{

Callers

nothing calls this directly

Calls 9

v_length2_xFunction · 0.85
v_atan2Function · 0.85
v_splat_zFunction · 0.70
v_perm_xzxzFunction · 0.70
v_perm_xaxaFunction · 0.70
v_splat_yFunction · 0.70
v_xorFunction · 0.70
v_cast_vec4fFunction · 0.70
v_seti_xFunction · 0.70

Tested by

no test coverage detected