[FEAT] Matrix add dertminant

This commit is contained in:
NADAL Jean-Baptiste
2024-02-02 16:39:45 +01:00
parent 76144ffba2
commit bab4ba5a2b
3 changed files with 20 additions and 0 deletions

View File

@@ -227,3 +227,15 @@ TEST_CASE("[Matrix] Transposing the identity matrix", "[Matrix]")
REQUIRE(a == Matrix::identity());
}
/* ------------------------------------------------------------------------- */
TEST_CASE("[Matrix] Calculating the determinant of a 2x2 matrix", "[Matrix]")
{
Matrix a = {
{ 1, 5},
{-3, 2}
};
REQUIRE(a.determinant() == 17);
}