| 79 | } |
| 80 | |
| 81 | void Matrix::Decompose(float& yaw, float& pitch, float& roll) const |
| 82 | { |
| 83 | pitch = Math::Asin(-M32); |
| 84 | if (Math::Cos(pitch) > 1e-12f) |
| 85 | { |
| 86 | roll = Math::Atan2(M12, M22); |
| 87 | yaw = Math::Atan2(M31, M33); |
| 88 | } |
| 89 | else |
| 90 | { |
| 91 | roll = Math::Atan2(-M21, M11); |
| 92 | yaw = 0.0f; |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | void Matrix::Decompose(Float3& scale, Float3& translation) const |
| 97 | { |
no test coverage detected