mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Core: Use Math namespace for constants
This commit is contained in:
parent
06c71fbf40
commit
94282d88f9
181 changed files with 812 additions and 818 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue