Selaa lähdekoodia

Merge pull request #1767 from Zylann/quaterion_abs

Use Math::abs to avoid ambiguity with integer abs
David Snopek 5 kuukautta sitten
vanhempi
commit
94a8fad88c
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      include/godot_cpp/variant/quaternion.hpp

+ 1 - 1
include/godot_cpp/variant/quaternion.hpp

@@ -149,7 +149,7 @@ struct [[nodiscard]] Quaternion {
 		Vector3 n0 = p_v0.normalized();
 		Vector3 n1 = p_v1.normalized();
 		real_t d = n0.dot(n1);
-		if (abs(d) > ALMOST_ONE) {
+		if (Math::abs(d) > ALMOST_ONE) {
 			if (d >= 0) {
 				return; // Vectors are same.
 			}