Add IsNan helper function to CVector3f

This commit is contained in:
Phillip Stephens 2021-05-16 15:29:06 -07:00
parent b3806c03a5
commit 9130bf977e
Signed by: Antidote
GPG Key ID: F8BEE4C83DACA60D
1 changed files with 1 additions and 0 deletions

View File

@ -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); }