CVector2f: Remove unnecessary constexpr

This commit is contained in:
Luke Street 2021-01-06 20:33:36 -05:00
parent 906e7736a0
commit 9ea070c2d7
1 changed files with 3 additions and 3 deletions

View File

@ -155,7 +155,7 @@ public:
[[nodiscard]] constexpr float magSquared() const { return mSimd.dot2(mSimd); } [[nodiscard]] constexpr float magSquared() const { return mSimd.dot2(mSimd); }
[[nodiscard]] constexpr float magnitude() const { return std::sqrt(magSquared()); } [[nodiscard]] float magnitude() const { return std::sqrt(magSquared()); }
constexpr void zeroOut() { mSimd = 0.f; } constexpr void zeroOut() { mSimd = 0.f; }
@ -173,9 +173,9 @@ public:
[[nodiscard]] static CVector2f slerp(const CVector2f& a, const CVector2f& b, float t); [[nodiscard]] static CVector2f slerp(const CVector2f& a, const CVector2f& b, float t);
[[nodiscard]] constexpr bool isNormalized() const { return std::fabs(1.f - magSquared()) < 0.01f; } [[nodiscard]] bool isNormalized() const { return std::fabs(1.f - magSquared()) < 0.01f; }
[[nodiscard]] constexpr bool canBeNormalized() const { [[nodiscard]] bool canBeNormalized() const {
if (std::isinf(x()) || std::isinf(y())) if (std::isinf(x()) || std::isinf(y()))
return false; return false;
return std::fabs(x()) >= FLT_EPSILON || std::fabs(y()) >= FLT_EPSILON; return std::fabs(x()) >= FLT_EPSILON || std::fabs(y()) >= FLT_EPSILON;