summaryrefslogtreecommitdiff
path: root/servers/physics_2d
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-04-29 10:16:46 +0200
committerGitHub <noreply@github.com>2019-04-29 10:16:46 +0200
commit18e88c85631adb0b83114687f8c20d9b210a88bf (patch)
tree28d1817600fb497215008d08045ed4e20a8cba95 /servers/physics_2d
parent90cc1d3c1d2e77ca72c5949b21a5c40738abcd81 (diff)
parentb659e1eb2b732ebc836614735438ca0bcdc8a32d (diff)
Merge pull request #18992 from aaronfranke/mono-equal-approx
[Core] [Mono] Improve and use approximate equality methods
Diffstat (limited to 'servers/physics_2d')
-rw-r--r--servers/physics_2d/collision_solver_2d_sat.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/physics_2d/collision_solver_2d_sat.cpp b/servers/physics_2d/collision_solver_2d_sat.cpp
index d6c3fff421..f4bff66389 100644
--- a/servers/physics_2d/collision_solver_2d_sat.cpp
+++ b/servers/physics_2d/collision_solver_2d_sat.cpp
@@ -237,8 +237,8 @@ public:
Vector2 axis = p_axis;
- if (Math::abs(axis.x) < CMP_EPSILON &&
- Math::abs(axis.y) < CMP_EPSILON) {
+ if (Math::is_zero_approx(axis.x) &&
+ Math::is_zero_approx(axis.y)) {
// strange case, try an upwards separator
axis = Vector2(0.0, 1.0);
}