Rename built-in SGN() macro to SIGN()

This matches the name of the GDScript function (except it's uppercase
here).
This commit is contained in:
Hugo Locurcio 2021-10-16 01:22:57 +02:00
parent 5045f46a5c
commit 8fb7e622a6
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C
18 changed files with 34 additions and 34 deletions

View file

@ -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);