diff options
| author | lepelog <25211966+lepelog@users.noreply.github.com> | 2025-12-13 01:23:37 +0100 |
|---|---|---|
| committer | lepelog <25211966+lepelog@users.noreply.github.com> | 2026-02-01 18:14:38 +0100 |
| commit | b017949c4b37acbfea90fdd5641dbdceaee688a7 (patch) | |
| tree | 1648b752fd8a55070ac3555ea9615e09dd95a7b1 /include/egg/math/eggVector.h | |
| parent | 62fc066b605680af84cc921aba070b62e7df8ff7 (diff) | |
d_t_mass_obj 99%
Diffstat (limited to 'include/egg/math/eggVector.h')
| -rw-r--r-- | include/egg/math/eggVector.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/egg/math/eggVector.h b/include/egg/math/eggVector.h index abcf1176..8886a45a 100644 --- a/include/egg/math/eggVector.h +++ b/include/egg/math/eggVector.h @@ -1,11 +1,14 @@ #ifndef EGG_VECTOR_H #define EGG_VECTOR_H +#include "JSystem/JMath/JMath.h" #include "common.h" #include "egg/math/eggMath.h" +#include "nw4r/math/math_arithmetic.h" #include "nw4r/math/math_triangular.h" #include "nw4r/math.h" +#include <cmath> namespace EGG { @@ -132,6 +135,10 @@ struct Vector3f : public nw4r::math::VEC3 { return squaredLength() <= Math<f32>::epsilon(); } + bool isZero2() const { + return fabsf(JMathInlineVEC::C_VECSquareMag(*this)) <= Math<f32>::epsilon(); + } + void setZero() { x = y = z = 0.0f; } |
