From 9130bf977e26bbee87c7364ff16fe621f56f1d3f Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sun, 16 May 2021 15:29:06 -0700 Subject: [PATCH] Add IsNan helper function to CVector3f --- include/zeus/CVector3f.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/zeus/CVector3f.hpp b/include/zeus/CVector3f.hpp index 4a62183..c358044 100644 --- a/include/zeus/CVector3f.hpp +++ b/include/zeus/CVector3f.hpp @@ -139,6 +139,7 @@ public: [[nodiscard]] bool isNotInf() const { return !(std::isinf(x()) || std::isinf(y()) || std::isinf(z())); } [[nodiscard]] bool isMagnitudeSafe() const { return isNotInf() && magSquared() >= 9.9999994e-29; } + [[nodiscard]] bool isNaN() const { return std::isnan(x()) || std::isnan(y()) || std::isnan(z()); } void zeroOut() { mSimd.broadcast(0.f); }