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:
parent
5045f46a5c
commit
8fb7e622a6
18 changed files with 34 additions and 34 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue