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

Core: Use Math namespace for constants

This commit is contained in:
Thaddeus Crews
2025-04-10 11:21:05 -05:00
parent 06c71fbf40
commit 94282d88f9
181 changed files with 812 additions and 818 deletions

View File

@@ -98,14 +98,14 @@ void GridMapEditor::_menu_option(int p_option) {
Basis r;
if (input_action == INPUT_PASTE) {
r = node->get_basis_with_orthogonal_index(paste_indicator.orientation);
r.rotate(Vector3(0, 1, 0), -Math_PI / 2.0);
r.rotate(Vector3(0, 1, 0), -Math::PI / 2.0);
paste_indicator.orientation = node->get_orthogonal_index_from_basis(r);
_update_paste_indicator();
break;
}
r = node->get_basis_with_orthogonal_index(cursor_rot);
r.rotate(Vector3(0, 1, 0), -Math_PI / 2.0);
r.rotate(Vector3(0, 1, 0), -Math::PI / 2.0);
cursor_rot = node->get_orthogonal_index_from_basis(r);
_update_cursor_transform();
} break;
@@ -113,14 +113,14 @@ void GridMapEditor::_menu_option(int p_option) {
Basis r;
if (input_action == INPUT_PASTE) {
r = node->get_basis_with_orthogonal_index(paste_indicator.orientation);
r.rotate(Vector3(1, 0, 0), -Math_PI / 2.0);
r.rotate(Vector3(1, 0, 0), -Math::PI / 2.0);
paste_indicator.orientation = node->get_orthogonal_index_from_basis(r);
_update_paste_indicator();
break;
}
r = node->get_basis_with_orthogonal_index(cursor_rot);
r.rotate(Vector3(1, 0, 0), -Math_PI / 2.0);
r.rotate(Vector3(1, 0, 0), -Math::PI / 2.0);
cursor_rot = node->get_orthogonal_index_from_basis(r);
_update_cursor_transform();
} break;
@@ -128,14 +128,14 @@ void GridMapEditor::_menu_option(int p_option) {
Basis r;
if (input_action == INPUT_PASTE) {
r = node->get_basis_with_orthogonal_index(paste_indicator.orientation);
r.rotate(Vector3(0, 0, 1), -Math_PI / 2.0);
r.rotate(Vector3(0, 0, 1), -Math::PI / 2.0);
paste_indicator.orientation = node->get_orthogonal_index_from_basis(r);
_update_paste_indicator();
break;
}
r = node->get_basis_with_orthogonal_index(cursor_rot);
r.rotate(Vector3(0, 0, 1), -Math_PI / 2.0);
r.rotate(Vector3(0, 0, 1), -Math::PI / 2.0);
cursor_rot = node->get_orthogonal_index_from_basis(r);
_update_cursor_transform();
} break;
@@ -143,14 +143,14 @@ void GridMapEditor::_menu_option(int p_option) {
Basis r;
if (input_action == INPUT_PASTE) {
r = node->get_basis_with_orthogonal_index(paste_indicator.orientation);
r.rotate(Vector3(0, 1, 0), Math_PI / 2.0);
r.rotate(Vector3(0, 1, 0), Math::PI / 2.0);
paste_indicator.orientation = node->get_orthogonal_index_from_basis(r);
_update_paste_indicator();
break;
}
r = node->get_basis_with_orthogonal_index(cursor_rot);
r.rotate(Vector3(0, 1, 0), Math_PI / 2.0);
r.rotate(Vector3(0, 1, 0), Math::PI / 2.0);
cursor_rot = node->get_orthogonal_index_from_basis(r);
_update_cursor_transform();
} break;
@@ -158,14 +158,14 @@ void GridMapEditor::_menu_option(int p_option) {
Basis r;
if (input_action == INPUT_PASTE) {
r = node->get_basis_with_orthogonal_index(paste_indicator.orientation);
r.rotate(Vector3(1, 0, 0), Math_PI / 2.0);
r.rotate(Vector3(1, 0, 0), Math::PI / 2.0);
paste_indicator.orientation = node->get_orthogonal_index_from_basis(r);
_update_paste_indicator();
break;
}
r = node->get_basis_with_orthogonal_index(cursor_rot);
r.rotate(Vector3(1, 0, 0), Math_PI / 2.0);
r.rotate(Vector3(1, 0, 0), Math::PI / 2.0);
cursor_rot = node->get_orthogonal_index_from_basis(r);
_update_cursor_transform();
} break;
@@ -173,14 +173,14 @@ void GridMapEditor::_menu_option(int p_option) {
Basis r;
if (input_action == INPUT_PASTE) {
r = node->get_basis_with_orthogonal_index(paste_indicator.orientation);
r.rotate(Vector3(0, 0, 1), Math_PI / 2.0);
r.rotate(Vector3(0, 0, 1), Math::PI / 2.0);
paste_indicator.orientation = node->get_orthogonal_index_from_basis(r);
_update_paste_indicator();
break;
}
r = node->get_basis_with_orthogonal_index(cursor_rot);
r.rotate(Vector3(0, 0, 1), Math_PI / 2.0);
r.rotate(Vector3(0, 0, 1), Math::PI / 2.0);
cursor_rot = node->get_orthogonal_index_from_basis(r);
_update_cursor_transform();
} break;