1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Use Vector* component-wise min/max/clamp functions where applicable

This commit is contained in:
A Thousand Ships
2024-03-03 12:49:08 +01:00
parent fe01776f05
commit 79ba22a73f
53 changed files with 95 additions and 176 deletions

View File

@@ -505,10 +505,8 @@ void Skeleton3DEditor::_file_selected(const String &p_file) {
position_max = Vector2(grest.origin.x, grest.origin.y);
position_min = Vector2(grest.origin.x, grest.origin.y);
} else {
position_max.x = MAX(grest.origin.x, position_max.x);
position_max.y = MAX(grest.origin.y, position_max.y);
position_min.x = MIN(grest.origin.x, position_min.x);
position_min.y = MIN(grest.origin.y, position_min.y);
position_max = position_max.max(Vector2(grest.origin.x, grest.origin.y));
position_min = position_min.min(Vector2(grest.origin.x, grest.origin.y));
}
}