mirror of
https://github.com/AxioDL/zeus.git
synced 2025-12-21 10:49:15 +00:00
Fix CVector3f::canBeNormalized
This commit is contained in:
@@ -341,7 +341,10 @@ public:
|
|||||||
|
|
||||||
inline bool isNormalized() const { return std::fabs(1.f - magSquared()) < 0.01f; }
|
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; }
|
inline bool isZero() const { return magSquared() <= 1.1920929e-7f; }
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#ifndef MATH_HPP
|
#ifndef MATH_HPP
|
||||||
#define MATH_HPP
|
#define MATH_HPP
|
||||||
|
|
||||||
|
#include <float.h>
|
||||||
#undef min
|
#undef min
|
||||||
#undef max
|
#undef max
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user