diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-20 23:02:13 +0100 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-20 23:02:13 +0100 |
| commit | 00b29630bacf2dc397fb90fd9243fb0ad7b834a2 (patch) | |
| tree | f72ffda5f26945b2b6b639e92ec537eb6df28bae /include/godot_cpp/core | |
| parent | 860182fe010dea847726d309bf615927e019a8d2 (diff) | |
| parent | d3f17c1dcaff98ab2876438c7c1b731b45e1d9b2 (diff) | |
| download | redot-cpp-00b29630bacf2dc397fb90fd9243fb0ad7b834a2.tar.gz | |
Merge pull request #1003 from akien-mga/fix-sign-0
Change behavior of Math::sign to match Godot builtin
Diffstat (limited to 'include/godot_cpp/core')
| -rw-r--r-- | include/godot_cpp/core/math.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/godot_cpp/core/math.hpp b/include/godot_cpp/core/math.hpp index 48d1283..db97ba5 100644 --- a/include/godot_cpp/core/math.hpp +++ b/include/godot_cpp/core/math.hpp @@ -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> |
