Havok: Use hkFloat32 instead of hkReal in hkVector4f

hkVector4f is for floats
This commit is contained in:
Léo Lam 2021-12-19 12:11:15 +01:00
parent 17fcbf8c43
commit b028cb3264
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
1 changed files with 5 additions and 5 deletions

View File

@ -9,28 +9,28 @@ public:
HK_DECLARE_CLASS_ALLOCATOR(hkVector4f) HK_DECLARE_CLASS_ALLOCATOR(hkVector4f)
HK_FORCE_INLINE hkVector4f() {} HK_FORCE_INLINE hkVector4f() {}
HK_FORCE_INLINE hkVector4f(hkReal x, hkReal y, hkReal z, hkReal w = 0); HK_FORCE_INLINE hkVector4f(hkFloat32 x, hkFloat32 y, hkFloat32 z, hkFloat32 w = 0);
// This prevents hkVector4f from being passed in registers. // This prevents hkVector4f from being passed in registers.
// NOLINTNEXTLINE(modernize-use-equals-default) // NOLINTNEXTLINE(modernize-use-equals-default)
HK_FORCE_INLINE hkVector4f(const hkVector4f& other) : v(other.v) {} HK_FORCE_INLINE hkVector4f(const hkVector4f& other) : v(other.v) {}
HK_FORCE_INLINE void set(hkReal x, hkReal y, hkReal z, hkReal w = 0); HK_FORCE_INLINE void set(hkFloat32 x, hkFloat32 y, hkFloat32 z, hkFloat32 w = 0);
HK_FORCE_INLINE void setAll(hkReal x); HK_FORCE_INLINE void setAll(hkFloat32 x);
void sub_7100FABE80(const hkVector4f&, const hkVector4f&); void sub_7100FABE80(const hkVector4f&, const hkVector4f&);
m128 v; m128 v;
}; };
inline hkVector4f::hkVector4f(hkReal x, hkReal y, hkReal z, hkReal w) { inline hkVector4f::hkVector4f(hkFloat32 x, hkFloat32 y, hkFloat32 z, hkFloat32 w) {
v[0] = x; v[0] = x;
v[1] = y; v[1] = y;
v[2] = z; v[2] = z;
v[3] = w; v[3] = w;
} }
inline void hkVector4f::set(hkReal x, hkReal y, hkReal z, hkReal w) { inline void hkVector4f::set(hkFloat32 x, hkFloat32 y, hkFloat32 z, hkFloat32 w) {
v[0] = x; v[0] = x;
v[1] = y; v[1] = y;
v[2] = z; v[2] = z;