mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +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
|
|
@ -464,14 +464,14 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
|
|||
}
|
||||
Vector2 npos = state_machine->get_node_position(E);
|
||||
|
||||
float d_x = ABS(npos.x - cpos.x);
|
||||
float d_x = Math::abs(npos.x - cpos.x);
|
||||
if (d_x < MIN(5, best_d_x)) {
|
||||
drag_ofs.x -= cpos.x - npos.x;
|
||||
best_d_x = d_x;
|
||||
snap_x = E;
|
||||
}
|
||||
|
||||
float d_y = ABS(npos.y - cpos.y);
|
||||
float d_y = Math::abs(npos.y - cpos.y);
|
||||
if (d_y < MIN(5, best_d_y)) {
|
||||
drag_ofs.y -= cpos.y - npos.y;
|
||||
best_d_y = d_y;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue