mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-21 13:21:02 +00:00
all float3 and float4 functions and isas
completed all options of float3 and float4 functions in isas and math_c neon still to be done but that will be on mac.
This commit is contained in:
parent
18d0aa0418
commit
f0a3251cd3
16 changed files with 593 additions and 90 deletions
|
|
@ -34,9 +34,22 @@ namespace
|
|||
sums = _mm_add_ps(sums, shuf); // total sum in lower float
|
||||
return _mm_cvtss_f32(sums);
|
||||
}
|
||||
|
||||
inline f32x4 v_cross(f32x4 a, f32x4 b)
|
||||
{
|
||||
f32x4 a_yzx = _mm_shuffle_ps(a, a, _MM_SHUFFLE(3, 0, 2, 1));
|
||||
f32x4 b_yzx = _mm_shuffle_ps(b, b, _MM_SHUFFLE(3, 0, 2, 1));
|
||||
|
||||
f32x4 c = _mm_sub_ps(
|
||||
_mm_mul_ps(a, b_yzx),
|
||||
_mm_mul_ps(a_yzx, b)
|
||||
);
|
||||
|
||||
return _mm_shuffle_ps(c, c, _MM_SHUFFLE(3, 0, 2, 1));
|
||||
}
|
||||
}
|
||||
|
||||
#include "../../impl/float4_impl.inl"
|
||||
#include "float4_impl.inl"
|
||||
|
||||
namespace math_backend::float4::dispatch
|
||||
{
|
||||
|
|
@ -55,5 +68,6 @@ namespace math_backend::float4::dispatch
|
|||
gFloat4.normalize = float4_normalize_impl;
|
||||
gFloat4.normalize_mag = float4_normalize_mag_impl;
|
||||
gFloat4.lerp = float4_lerp_impl;
|
||||
gFloat4.cross = float4_cross_impl;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue