From ac7d83009dae97a28ba779d00188e3d76e9b9821 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Fri, 3 Jun 2022 01:52:41 -0400 Subject: [PATCH] CMatrix4f: Explicit operator==/!= --- include/zeus/CMatrix4f.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/zeus/CMatrix4f.hpp b/include/zeus/CMatrix4f.hpp index 5ac0d4d..5b527b3 100644 --- a/include/zeus/CMatrix4f.hpp +++ b/include/zeus/CMatrix4f.hpp @@ -51,7 +51,13 @@ public: constexpr CMatrix4f& operator=(const CMatrix4f& other) = default; - constexpr bool operator==(const CMatrix4f&) const = default; + [[nodiscard]] bool operator==(const CMatrix4f& rhs) const { + return m[0] == rhs.m[0] && m[1] == rhs.m[1] && m[2] == rhs.m[2] && m[3] == rhs.m[3]; + } + + [[nodiscard]] bool operator!=(const CMatrix4f& rhs) const { + return m[0] != rhs.m[0] || m[1] != rhs.m[1] || m[2] != rhs.m[2] || m[3] != rhs.m[3]; + } [[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>() +