mirror of https://github.com/AxioDL/zeus.git
CVector3f/CVector2f: Fix isZero
This commit is contained in:
parent
f99184556a
commit
58c8a902ac
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue