Merge pull request #1003 from akien-mga/fix-sign-0

Change behavior of Math::sign to match Godot builtin
This commit is contained in:
Rémi Verschelde
2023-01-20 23:02:13 +01:00

View File

@@ -561,7 +561,7 @@ inline T max(T a, T b) {
template <typename T>
inline T sign(T x) {
return static_cast<T>(x < 0 ? -1 : 1);
return static_cast<T>(SIGN(x));
}
template <typename T>