1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Remove ABS in favor of Math::abs

This commit is contained in:
kobewi
2022-11-30 17:56:32 +01:00
parent 3d9b05ad4a
commit 10f6c01b9c
68 changed files with 142 additions and 146 deletions

View File

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