|
|
|
@ -40,7 +40,9 @@ class RectangularMatrixTest: public Corrade::TestSuite::Tester { |
|
|
|
void constructFromData(); |
|
|
|
void constructFromData(); |
|
|
|
void constructFromDiagonal(); |
|
|
|
void constructFromDiagonal(); |
|
|
|
void constructCopy(); |
|
|
|
void constructCopy(); |
|
|
|
|
|
|
|
|
|
|
|
void data(); |
|
|
|
void data(); |
|
|
|
|
|
|
|
void row(); |
|
|
|
|
|
|
|
|
|
|
|
void compare(); |
|
|
|
void compare(); |
|
|
|
|
|
|
|
|
|
|
|
@ -79,7 +81,9 @@ RectangularMatrixTest::RectangularMatrixTest() { |
|
|
|
&RectangularMatrixTest::constructFromData, |
|
|
|
&RectangularMatrixTest::constructFromData, |
|
|
|
&RectangularMatrixTest::constructFromDiagonal, |
|
|
|
&RectangularMatrixTest::constructFromDiagonal, |
|
|
|
&RectangularMatrixTest::constructCopy, |
|
|
|
&RectangularMatrixTest::constructCopy, |
|
|
|
|
|
|
|
|
|
|
|
&RectangularMatrixTest::data, |
|
|
|
&RectangularMatrixTest::data, |
|
|
|
|
|
|
|
&RectangularMatrixTest::row, |
|
|
|
|
|
|
|
|
|
|
|
&RectangularMatrixTest::compare, |
|
|
|
&RectangularMatrixTest::compare, |
|
|
|
|
|
|
|
|
|
|
|
@ -199,6 +203,14 @@ void RectangularMatrixTest::data() { |
|
|
|
CORRADE_COMPARE(d, 3.0f); |
|
|
|
CORRADE_COMPARE(d, 3.0f); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void RectangularMatrixTest::row() { |
|
|
|
|
|
|
|
const Matrix3x4 a(Vector4(1.0f, 2.0f, 3.0f, 4.0f), |
|
|
|
|
|
|
|
Vector4(5.0f, 6.0f, 7.0f, 8.0f), |
|
|
|
|
|
|
|
Vector4(9.0f, 10.0f, 11.0f, 12.0f)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CORRADE_COMPARE(a.row(1), Vector3(2.0f, 6.0f, 10.0f)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void RectangularMatrixTest::compare() { |
|
|
|
void RectangularMatrixTest::compare() { |
|
|
|
Matrix2 a(Vector2(1.0f, -3.0f), |
|
|
|
Matrix2 a(Vector2(1.0f, -3.0f), |
|
|
|
Vector2(5.0f, -10.0f)); |
|
|
|
Vector2(5.0f, -10.0f)); |
|
|
|
|