Sfoglia il codice sorgente

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.

(cherry picked from commit 03e11c13bfb1649fc9cf9a460249bce5e7f07462)
Rémi Verschelde 7 anni fa
parent
commit
849ff42496
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      servers/physics/collision_solver_sat.cpp

+ 3 - 1
servers/physics/collision_solver_sat.cpp

@@ -346,7 +346,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) {