diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-10-16 01:22:57 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-11-16 20:40:49 +0100 |
commit | 8fb7e622a6a4d6651442764e4e22e000f455f77b (patch) | |
tree | c0a47367d1778fb3903be27067ad0c3731e76668 /scene/gui/spin_box.cpp | |
parent | 5045f46a5c384d83504be3d0cf101e403700b1e3 (diff) |
Rename built-in `SGN()` macro to `SIGN()`
This matches the name of the GDScript function (except it's uppercase
here).
Diffstat (limited to 'scene/gui/spin_box.cpp')
-rw-r--r-- | scene/gui/spin_box.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp index 4497c20772..f30206c943 100644 --- a/scene/gui/spin_box.cpp +++ b/scene/gui/spin_box.cpp @@ -166,7 +166,7 @@ void SpinBox::gui_input(const Ref<InputEvent> &p_event) { if (mm.is_valid() && (mm->get_button_mask() & MouseButton::MASK_LEFT) != MouseButton::NONE) { if (drag.enabled) { drag.diff_y += mm->get_relative().y; - float diff_y = -0.01 * Math::pow(ABS(drag.diff_y), 1.8f) * SGN(drag.diff_y); + float diff_y = -0.01 * Math::pow(ABS(drag.diff_y), 1.8f) * SIGN(drag.diff_y); set_value(CLAMP(drag.base_val + get_step() * diff_y, get_min(), get_max())); } else if (drag.allowed && drag.capture_pos.distance_to(mm->get_position()) > 2) { Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_CAPTURED); |