1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 12:17:35 +00:00

LibGfx: Add method to Matrix that determines if the matrix is invertible

This commit is contained in:
Luke Wilde 2023-02-27 18:01:41 +00:00 committed by Andreas Kling
parent fcd3b16d63
commit dec09333a3

View file

@ -223,6 +223,11 @@ public:
return result; return result;
} }
constexpr bool is_invertible() const
{
return determinant() != 0.0;
}
private: private:
T m_elements[N][N]; T m_elements[N][N];
}; };