[FEAT] Matrix add transpose
This commit is contained in:
@@ -194,3 +194,25 @@ TEST_CASE("[Matrix] Multiplying the identity matrix by a tuple", "[Matrix]")
|
||||
|
||||
REQUIRE((Matrix::identity() * a) == a);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
TEST_CASE("[Matrix] Transposing a matrix", "[Matrix]")
|
||||
{
|
||||
Matrix a = {
|
||||
{0, 9, 3, 0},
|
||||
{9, 8, 0, 8},
|
||||
{1, 8, 5, 3},
|
||||
{0, 0, 5, 8}
|
||||
};
|
||||
Matrix transposed = {
|
||||
{0, 9, 1, 0},
|
||||
{9, 8, 8, 0},
|
||||
{3, 0, 5, 5},
|
||||
{0, 8, 3, 8}
|
||||
};
|
||||
|
||||
a.transpose();
|
||||
|
||||
REQUIRE(a == transposed);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user