1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-26 15:46:23 +00:00

Core: Add constexpr constructors/operators to math structs

• Begin integrating `constexpr` on math tests; use `static_assert` where appropriate
This commit is contained in:
Thaddeus Crews
2024-11-01 11:15:21 -05:00
parent 9e6ee9c5c3
commit ea62170dac
56 changed files with 1109 additions and 1159 deletions

View File

@@ -707,22 +707,6 @@ bool Basis::is_finite() const {
return rows[0].is_finite() && rows[1].is_finite() && rows[2].is_finite();
}
bool Basis::operator==(const Basis &p_matrix) const {
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
if (rows[i][j] != p_matrix.rows[i][j]) {
return false;
}
}
}
return true;
}
bool Basis::operator!=(const Basis &p_matrix) const {
return (!(*this == p_matrix));
}
Basis::operator String() const {
return "[X: " + get_column(0).operator String() +
", Y: " + get_column(1).operator String() +