diff --git a/include/zeus/CVector2f.hpp b/include/zeus/CVector2f.hpp index b05c9d2..7929a5e 100644 --- a/include/zeus/CVector2f.hpp +++ b/include/zeus/CVector2f.hpp @@ -184,7 +184,7 @@ public: return std::fabs(x()) >= FLT_EPSILON || std::fabs(y()) >= FLT_EPSILON; } - [[nodiscard]] bool isZero() const { return magSquared() <= FLT_EPSILON; } + [[nodiscard]] bool isZero() const { return mSimd[0] == 0.f && mSimd[1] == 0.f; } [[nodiscard]] bool isEqu(const CVector2f& other, float epsilon = FLT_EPSILON) const { const CVector2f diffVec = other - *this; diff --git a/include/zeus/CVector3f.hpp b/include/zeus/CVector3f.hpp index c755065..f8f7ecd 100644 --- a/include/zeus/CVector3f.hpp +++ b/include/zeus/CVector3f.hpp @@ -162,7 +162,7 @@ public: return !(std::fabs(x()) < FLT_EPSILON && std::fabs(y()) < FLT_EPSILON && std::fabs(z()) < FLT_EPSILON); } - [[nodiscard]] bool isZero() const { return magSquared() <= FLT_EPSILON; } + [[nodiscard]] bool isZero() const { return mSimd[0] == 0.f && mSimd[1] == 0.f && mSimd[2] == 0.f; } void scaleToLength(float newLength) { float length = magSquared();