mirror of https://github.com/zeldaret/botw.git
Havok: Fix hkVector4f::setReciprocal
This commit is contained in:
parent
f86b6dde65
commit
0a19a4b057
|
@ -134,7 +134,10 @@ inline void hkVector4f::setSub(hkVector4fParameter a, hkSimdFloat32Parameter b)
|
||||||
|
|
||||||
inline void hkVector4f::setReciprocal(hkVector4fParameter a) {
|
inline void hkVector4f::setReciprocal(hkVector4fParameter a) {
|
||||||
#ifdef HK_VECTOR4F_AARCH64_NEON
|
#ifdef HK_VECTOR4F_AARCH64_NEON
|
||||||
v = vrecpeq_f32(a.v);
|
auto result = vrecpeq_f32(a.v);
|
||||||
|
result *= vrecpsq_f32(a.v, result);
|
||||||
|
result *= vrecpsq_f32(a.v, result);
|
||||||
|
v = result;
|
||||||
#else
|
#else
|
||||||
for (int i = 0; i < 4; ++i)
|
for (int i = 0; i < 4; ++i)
|
||||||
v[i] = 1.0f / a[i];
|
v[i] = 1.0f / a[i];
|
||||||
|
|
Loading…
Reference in New Issue