matrix: add tranposition test case
This commit is contained in:
parent
a1666a179b
commit
2d31cf9537
@ -24,6 +24,18 @@ main (void)
|
|||||||
|
|
||||||
tap.expect_eq (sum (SEQ), 136.f, "element summation");
|
tap.expect_eq (sum (SEQ), 136.f, "element summation");
|
||||||
|
|
||||||
|
// tranposition
|
||||||
|
{
|
||||||
|
static constexpr util::matrix4f QES {{
|
||||||
|
{ 1, 5, 9, 13 },
|
||||||
|
{ 2, 6, 10, 14 },
|
||||||
|
{ 3, 7, 11, 15 },
|
||||||
|
{ 4, 8, 12, 16 }
|
||||||
|
}};
|
||||||
|
tap.expect_eq (transposed (SEQ), QES, "transposition");
|
||||||
|
tap.expect_eq (transposed (transposed (SEQ)), SEQ, "double tranposition is identity");
|
||||||
|
}
|
||||||
|
|
||||||
// matrix-scalar operations
|
// matrix-scalar operations
|
||||||
{
|
{
|
||||||
tap.expect_eq (sum (SEQ + 1.f), 152.f, "matrix-scalar addition");
|
tap.expect_eq (sum (SEQ + 1.f), 152.f, "matrix-scalar addition");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user