|
|
|
|
@ -40,6 +40,8 @@ class MatrixTest: public Corrade::TestSuite::Tester {
|
|
|
|
|
void constructConversion(); |
|
|
|
|
void constructCopy(); |
|
|
|
|
|
|
|
|
|
void isOrthogonal(); |
|
|
|
|
|
|
|
|
|
void trace(); |
|
|
|
|
void ij(); |
|
|
|
|
void determinant(); |
|
|
|
|
@ -63,6 +65,8 @@ MatrixTest::MatrixTest() {
|
|
|
|
|
&MatrixTest::constructConversion, |
|
|
|
|
&MatrixTest::constructCopy, |
|
|
|
|
|
|
|
|
|
&MatrixTest::isOrthogonal, |
|
|
|
|
|
|
|
|
|
&MatrixTest::trace, |
|
|
|
|
&MatrixTest::ij, |
|
|
|
|
&MatrixTest::determinant, |
|
|
|
|
@ -139,6 +143,18 @@ void MatrixTest::constructCopy() {
|
|
|
|
|
Vector4(7.9f, -1.0f, 8.0f, -1.5f))); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void MatrixTest::isOrthogonal() { |
|
|
|
|
CORRADE_VERIFY(!Matrix3(Vector3(1.0f, 0.0f, 0.0f), |
|
|
|
|
Vector3(0.0f, 1.0f, 0.0f), |
|
|
|
|
Vector3(0.0f, 0.1f, 1.0f)).isOrthogonal()); |
|
|
|
|
CORRADE_VERIFY(!Matrix3(Vector3(1.0f, 0.0f, 0.0f), |
|
|
|
|
Vector3(0.0f, 1.0f, 0.0f), |
|
|
|
|
Vector3(0.0f, 1.0f, 0.0f)).isOrthogonal()); |
|
|
|
|
CORRADE_VERIFY(Matrix3(Vector3(1.0f, 0.0f, 0.0f), |
|
|
|
|
Vector3(0.0f, 1.0f, 0.0f), |
|
|
|
|
Vector3(0.0f, 0.0f, 1.0f)).isOrthogonal()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void MatrixTest::trace() { |
|
|
|
|
Matrix<5, Int> m( |
|
|
|
|
Vector<5, Int>(1, 2, 3, 0, 0), |
|
|
|
|
|