Attempt to compute the inverse of the matrix.
Computes the inverse matrix if possible. A matrix is invertible if and only if its determinant is non-zero. The inverse of a transformation matrix represents the opposite transformation.
The inverse is computed using the adjugate matrix method:
- Calculate the determinant
- If determinant is non-zero:
- Compute the matrix of cofactors
- Transpose to get the adjugate matrix
- Multiply by 1/determinant
- Parameters
-
out | The resulting inverse matrix if successful. |
- Returns
- True if matrix was invertible (det ≠ 0), false otherwise.
- Note
- For orthogonal matrices (like pure rotation matrices), the inverse is equal to the transpose.
}
static consteval Angle FromDegrees(double degrees)
Creates angle from degrees at compile time.
Definition angle.hpp:204
bool constexpr TryInverse(Matrix33 &out) const
Attempt to compute the inverse of the matrix.
Definition mat33.hpp:641
constexpr Matrix33()
Default constructor initializing to a zero matrix.
Definition mat33.hpp:76
static constexpr Matrix33 CreateRotationY(const Angle &angle)
Create a new Y-axis rotation matrix.
Definition mat33.hpp:398