mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-19 20:30:58 +00:00
add normal safety
wrap safety around normal checks, this was done on the scalar math may as well do it here just in case. Ad the impl.inl files to libraries so they can actually be found.
This commit is contained in:
parent
5a6467d54a
commit
8c1acbd1da
7 changed files with 61 additions and 14 deletions
|
|
@ -85,9 +85,8 @@ namespace math_backend::float3
|
|||
inline void float3_normalize_impl(float* a)
|
||||
{
|
||||
f32x4 va = v_load3_vec(a);
|
||||
f32x4 invLen = v_rsqrt_nr(v_dot3(va, va)); // fully abstracted
|
||||
f32x4 vnorm = v_mul(va, invLen);
|
||||
v_store3(a, vnorm);
|
||||
f32x4 vr = v_normalize3(va);
|
||||
v_store3(a, vr);
|
||||
}
|
||||
|
||||
// Normalize with magnitude: r = normalize(a) * r
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue