mirror of https://github.com/AxioDL/zeus.git
Fix `CVector3f::canBeNormalized`
This commit is contained in:
parent
f370b22b3b
commit
b94b2cdd02
|
@ -341,7 +341,10 @@ public:
|
|||
|
||||
inline bool isNormalized() const { return std::fabs(1.f - magSquared()) < 0.01f; }
|
||||
|
||||
inline bool canBeNormalized() const { return !isNormalized(); }
|
||||
inline bool canBeNormalized() const
|
||||
{
|
||||
return (x < FLT_EPSILON || y < FLT_EPSILON || z < FLT_EPSILON);
|
||||
}
|
||||
|
||||
inline bool isZero() const { return magSquared() <= 1.1920929e-7f; }
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef MATH_HPP
|
||||
#define MATH_HPP
|
||||
|
||||
#include <float.h>
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
|
|
Loading…
Reference in New Issue