mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +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
|
|
@ -423,7 +423,7 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
|
|||
//Move the point in a single axis. Should only work when editing a polygon and while holding shift.
|
||||
if (mode == MODE_EDIT && mm->is_shift_pressed()) {
|
||||
Vector2 old_point = pre_move_edit.get(selected_point.vertex);
|
||||
if (ABS(cpoint.x - old_point.x) > ABS(cpoint.y - old_point.y)) {
|
||||
if (Math::abs(cpoint.x - old_point.x) > Math::abs(cpoint.y - old_point.y)) {
|
||||
cpoint.y = old_point.y;
|
||||
} else {
|
||||
cpoint.x = old_point.x;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue