diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-07-26 17:25:00 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2018-07-26 17:25:16 +0200 |
commit | 03e11c13bfb1649fc9cf9a460249bce5e7f07462 (patch) | |
tree | d2eefa77bef5c96376c98e0073e35a23fbddc1b4 | |
parent | e8da2a60b3b112919e237c5cbd3e79d76e39cf0b (diff) |
Add check to clang 6.0 compiler bug workaround
Extending on b68222e4e75d6cbe23c533f140733248df046c7e to ensure that it still
has the exact same behaviour as the previous code, as discussed with @hpvb.
-rw-r--r-- | servers/physics/collision_solver_sat.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/servers/physics/collision_solver_sat.cpp b/servers/physics/collision_solver_sat.cpp index 44b7c9ac34..8f2b147460 100644 --- a/servers/physics/collision_solver_sat.cpp +++ b/servers/physics/collision_solver_sat.cpp @@ -348,7 +348,9 @@ public: //use the smallest depth - min_B = -min_B; + if (min_B < 0.0) { // could be +0.0, we don't want it to become -0.0 + min_B = -min_B; + } if (max_B < min_B) { if (max_B < best_depth) { |