mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 06:37:52 +00:00
Matrix inversion comes in quite handy in 3D projections, so let's add `Matrix<N,T>.inverse()`. To support matrix inversion, the following methods are added: * `Matrix.first_minor()` See: https://en.wikipedia.org/wiki/Minor_(linear_algebra) * `Matrix.adjugate()` See: https://en.wikipedia.org/wiki/Adjugate_matrix * `Matrix.determinant()` See: https://en.wikipedia.org/wiki/Determinant * `Matrix.inverse()` See: https://en.wikipedia.org/wiki/Invertible_matrix * `Matrix.operator/()` To support easy matrix division :-) Code loosely based on an implementation listed here: https://www.geeksforgeeks.org/adjoint-inverse-matrix/
4.7 KiB
4.7 KiB