diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-07-21 11:16:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-21 11:16:19 +0200 |
commit | d4bbdb83674526a80ae6d0d2c080768da7629804 (patch) | |
tree | 9fbe5a4ba2bf8431b05845378ddaad6c07afc805 /servers/physics_3d/collision_solver_3d_sat.cpp | |
parent | 8cc599db645a356ca6af3bc15e7574fa6e3ada0e (diff) | |
parent | 78b0a7da0398dc8c6447b1439a6d07059311c028 (diff) |
Merge pull request #50521 from aaronfranke/iseqapprox
Use `is_equal_approx` in more places
Diffstat (limited to 'servers/physics_3d/collision_solver_3d_sat.cpp')
-rw-r--r-- | servers/physics_3d/collision_solver_3d_sat.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/servers/physics_3d/collision_solver_3d_sat.cpp b/servers/physics_3d/collision_solver_3d_sat.cpp index 1cfb9ba3ad..6a7f2b73c5 100644 --- a/servers/physics_3d/collision_solver_3d_sat.cpp +++ b/servers/physics_3d/collision_solver_3d_sat.cpp @@ -629,9 +629,7 @@ public: _FORCE_INLINE_ bool test_axis(const Vector3 &p_axis, bool p_directional = false) { Vector3 axis = p_axis; - if (Math::abs(axis.x) < CMP_EPSILON && - Math::abs(axis.y) < CMP_EPSILON && - Math::abs(axis.z) < CMP_EPSILON) { + if (axis.is_equal_approx(Vector3())) { // strange case, try an upwards separator axis = Vector3(0.0, 1.0, 0.0); } |