|
|
|
@ -62,6 +62,7 @@ class VectorTest: public Corrade::TestSuite::Tester { |
|
|
|
void constructConversion(); |
|
|
|
void constructConversion(); |
|
|
|
void constructCopy(); |
|
|
|
void constructCopy(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void isZero(); |
|
|
|
void isNormalized(); |
|
|
|
void isNormalized(); |
|
|
|
|
|
|
|
|
|
|
|
void convert(); |
|
|
|
void convert(); |
|
|
|
@ -109,6 +110,7 @@ VectorTest::VectorTest() { |
|
|
|
&VectorTest::constructConversion, |
|
|
|
&VectorTest::constructConversion, |
|
|
|
&VectorTest::constructCopy, |
|
|
|
&VectorTest::constructCopy, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
&VectorTest::isZero, |
|
|
|
&VectorTest::isNormalized, |
|
|
|
&VectorTest::isNormalized, |
|
|
|
|
|
|
|
|
|
|
|
&VectorTest::convert, |
|
|
|
&VectorTest::convert, |
|
|
|
@ -198,6 +200,11 @@ void VectorTest::constructCopy() { |
|
|
|
CORRADE_COMPARE(b, Vector4(1.0f, 3.5f, 4.0f, -2.7f)); |
|
|
|
CORRADE_COMPARE(b, Vector4(1.0f, 3.5f, 4.0f, -2.7f)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void VectorTest::isZero() { |
|
|
|
|
|
|
|
CORRADE_VERIFY(!Vector3(0.01f, 0.0f, 0.0f).isZero()); |
|
|
|
|
|
|
|
CORRADE_VERIFY(Vector3(0.0f, 0.0f, 0.0f).isZero()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void VectorTest::isNormalized() { |
|
|
|
void VectorTest::isNormalized() { |
|
|
|
CORRADE_VERIFY(!Vector3(1.0f, 2.0f, -1.0f).isNormalized()); |
|
|
|
CORRADE_VERIFY(!Vector3(1.0f, 2.0f, -1.0f).isNormalized()); |
|
|
|
CORRADE_VERIFY(Vector3(0.0f, 1.0f, 0.0f).isNormalized()); |
|
|
|
CORRADE_VERIFY(Vector3(0.0f, 1.0f, 0.0f).isNormalized()); |
|
|
|
|