mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Remove ABS in favor of Math::abs
This commit is contained in:
parent
3d9b05ad4a
commit
10f6c01b9c
68 changed files with 142 additions and 146 deletions
|
|
@ -293,7 +293,7 @@ void SpinBox::gui_input(const Ref<InputEvent> &p_event) {
|
|||
if (mm.is_valid() && (mm->get_button_mask().has_flag(MouseButtonMask::LEFT))) {
|
||||
if (drag.enabled) {
|
||||
drag.diff_y += mm->get_relative().y;
|
||||
double diff_y = -0.01 * Math::pow(ABS(drag.diff_y), 1.8) * SIGN(drag.diff_y);
|
||||
double diff_y = -0.01 * Math::pow(Math::abs(drag.diff_y), 1.8) * SIGN(drag.diff_y);
|
||||
use_custom_arrow_step = false;
|
||||
set_value(CLAMP(drag.base_val + step * diff_y, get_min(), get_max()));
|
||||
} else if (drag.allowed && drag.capture_pos.distance_to(mm->get_position()) > 2) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue