diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-03-07 16:29:31 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-03-07 16:29:31 +0000 |
| commit | 4f6146d75c2e1683ab48a3909138d2982746e243 (patch) | |
| tree | b924f5bbf684dec473c5001f3b535663940b7a2b /Tests/TestApp/src/MathLibTest.cpp | |
| parent | Updated core submodule (readme update) (diff) | |
| download | DiligentEngine-4f6146d75c2e1683ab48a3909138d2982746e243.tar.gz DiligentEngine-4f6146d75c2e1683ab48a3909138d2982746e243.zip | |
Added Matrix2x2 tests
Diffstat (limited to 'Tests/TestApp/src/MathLibTest.cpp')
| -rw-r--r-- | Tests/TestApp/src/MathLibTest.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Tests/TestApp/src/MathLibTest.cpp b/Tests/TestApp/src/MathLibTest.cpp index 1aac73e..572e338 100644 --- a/Tests/TestApp/src/MathLibTest.cpp +++ b/Tests/TestApp/src/MathLibTest.cpp @@ -415,6 +415,22 @@ public: // Matrix 3x3 { + float2x2 m1(1, 2, + 5, 6); + float2x2 m2(1, 2, + 5, 6); + VERIFY_EXPR(m1._11 == 1 && m1._12 == 2 && + m1._21 == 5 && m1._22 == 6); + VERIFY_EXPR(m1[0][0] == 1 && m1[0][1] == 2 && + m1[1][0] == 5 && m1[1][1] == 6); + + VERIFY_EXPR(m1 == m2); + auto t = transposeMatrix(transposeMatrix(m1)); + VERIFY_EXPR(t == m1); + } + + // Matrix 3x3 + { float3x3 m1( 1, 2, 3, 5, 6, 7, 9, 10, 11), @@ -498,6 +514,10 @@ public: 5, 6, 7, 9, 10, 11); std::hash<float3x3>()(m2); + + float2x2 m3(1, 2, + 5, 6); + std::hash<float2x2>()(m3); } SetStatus(TestResult::Succeeded); } |
