瀏覽代碼

Use Math::abs to avoid ambiguity with integer abs

Marc Gilleron 4 月之前
父節點
當前提交
5e6df6a196
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core/math/basis.cpp

+ 1 - 1
core/math/basis.cpp

@@ -268,7 +268,7 @@ Basis Basis::scaled_orthogonal(const Vector3 &p_scale) const {
 	Vector3 dots;
 	for (int i = 0; i < 3; i++) {
 		for (int j = 0; j < 3; j++) {
-			dots[j] += s[i] * abs(m.get_column(i).normalized().dot(b.get_column(j)));
+			dots[j] += s[i] * Math::abs(m.get_column(i).normalized().dot(b.get_column(j)));
 		}
 	}
 	if (sign != signbit(dots.x + dots.y + dots.z)) {