mirror of https://github.com/AxioDL/zeus.git
CMatrix3f: Remove normalize from CQuaternion ctor
This commit is contained in:
parent
f3e649716a
commit
8e4dfb022a
|
@ -51,6 +51,8 @@ public:
|
||||||
|
|
||||||
constexpr CMatrix4f& operator=(const CMatrix4f& other) = default;
|
constexpr CMatrix4f& operator=(const CMatrix4f& other) = default;
|
||||||
|
|
||||||
|
constexpr bool operator==(const CMatrix4f&) const = default;
|
||||||
|
|
||||||
[[nodiscard]] CVector4f operator*(const CVector4f& other) const {
|
[[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>() +
|
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>();
|
m[2].mSimd * other.mSimd.shuffle<2, 2, 2, 2>() + m[3].mSimd * other.mSimd.shuffle<3, 3, 3, 3>();
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
|
|
||||||
namespace zeus {
|
namespace zeus {
|
||||||
|
|
||||||
CMatrix3f::CMatrix3f(const CQuaternion& quat) {
|
CMatrix3f::CMatrix3f(const CQuaternion& nq) {
|
||||||
CQuaternion nq = quat.normalized();
|
|
||||||
float x2 = nq.x() * nq.x();
|
float x2 = nq.x() * nq.x();
|
||||||
float y2 = nq.y() * nq.y();
|
float y2 = nq.y() * nq.y();
|
||||||
float z2 = nq.z() * nq.z();
|
float z2 = nq.z() * nq.z();
|
||||||
|
|
Loading…
Reference in New Issue