CMatrix3f: Remove normalize from CQuaternion ctor

This commit is contained in:
Luke Street 2022-05-12 12:05:29 -04:00
parent f3e649716a
commit 8e4dfb022a
2 changed files with 3 additions and 2 deletions

View File

@ -51,6 +51,8 @@ public:
constexpr CMatrix4f& operator=(const CMatrix4f& other) = default;
constexpr bool operator==(const CMatrix4f&) const = default;
[[nodiscard]] CVector4f operator*(const CVector4f& other) const {
return m[0].mSimd * other.mSimd.shuffle<0, 0, 0, 0>() + m[1].mSimd * other.mSimd.shuffle<1, 1, 1, 1>() +
m[2].mSimd * other.mSimd.shuffle<2, 2, 2, 2>() + m[3].mSimd * other.mSimd.shuffle<3, 3, 3, 3>();

View File

@ -4,8 +4,7 @@
namespace zeus {
CMatrix3f::CMatrix3f(const CQuaternion& quat) {
CQuaternion nq = quat.normalized();
CMatrix3f::CMatrix3f(const CQuaternion& nq) {
float x2 = nq.x() * nq.x();
float y2 = nq.y() * nq.y();
float z2 = nq.z() * nq.z();