| 365 | } |
| 366 | |
| 367 | Vector3 Basis::get_euler_normalized(EulerOrder p_order) const { |
| 368 | Basis m = orthonormalized(); |
| 369 | real_t det = m.determinant(); |
| 370 | if (det < 0) { |
| 371 | // Ensure that the determinant is 1, such that result is a proper rotation matrix which can be represented by Euler angles. |
| 372 | m.scale(Vector3(-1, -1, -1)); |
| 373 | } |
| 374 | |
| 375 | return m.get_euler(p_order); |
| 376 | } |
| 377 | |
| 378 | Quaternion Basis::get_rotation_quaternion() const { |
| 379 | Basis m = orthonormalized(); |
no test coverage detected