diff --git a/src/Math/Test/ComplexTest.cpp b/src/Math/Test/ComplexTest.cpp index fb169465f..76136dbbf 100644 --- a/src/Math/Test/ComplexTest.cpp +++ b/src/Math/Test/ComplexTest.cpp @@ -255,6 +255,7 @@ void ComplexTest::angle() { void ComplexTest::rotation() { Complex a = Complex::rotation(Deg(120.0f)); + CORRADE_COMPARE(a.length(), 1.0f); CORRADE_COMPARE(a, Complex(-0.5f, 0.8660254f)); CORRADE_COMPARE_AS(a.rotationAngle(), Deg(120.0f), Rad); diff --git a/src/Math/Test/DualQuaternionTest.cpp b/src/Math/Test/DualQuaternionTest.cpp index ab0e52aad..7e64be636 100644 --- a/src/Math/Test/DualQuaternionTest.cpp +++ b/src/Math/Test/DualQuaternionTest.cpp @@ -190,6 +190,7 @@ void DualQuaternionTest::rotation() { CORRADE_COMPARE(o.str(), "Math::Quaternion::rotation(): axis must be normalized\n"); DualQuaternion q = DualQuaternion::rotation(Deg(120.0f), axis); + CORRADE_COMPARE(q.length(), 1.0f); CORRADE_COMPARE(q, DualQuaternion({Vector3(0.5f, 0.5f, 0.5f), 0.5f}, {{}, 0.0f})); CORRADE_COMPARE_AS(q.rotationAngle(), Deg(120.0f), Deg); CORRADE_COMPARE(q.rotationAxis(), axis); @@ -198,6 +199,7 @@ void DualQuaternionTest::rotation() { void DualQuaternionTest::translation() { Vector3 vec(1.0f, -3.5f, 0.5f); DualQuaternion q = DualQuaternion::translation(vec); + CORRADE_COMPARE(q.length(), 1.0f); CORRADE_COMPARE(q, DualQuaternion({}, {{0.5f, -1.75f, 0.25f}, 0.0f})); CORRADE_COMPARE(q.translation(), vec); } diff --git a/src/Math/Test/QuaternionTest.cpp b/src/Math/Test/QuaternionTest.cpp index b4472e768..11b28527b 100644 --- a/src/Math/Test/QuaternionTest.cpp +++ b/src/Math/Test/QuaternionTest.cpp @@ -235,6 +235,7 @@ void QuaternionTest::rotation() { CORRADE_COMPARE(o.str(), "Math::Quaternion::rotation(): axis must be normalized\n"); Quaternion q = Quaternion::rotation(Deg(120.0f), axis); + CORRADE_COMPARE(q.length(), 1.0f); CORRADE_COMPARE(q, Quaternion(Vector3(0.5f, 0.5f, 0.5f), 0.5f)); CORRADE_COMPARE_AS(q.rotationAngle(), Deg(120.0f), Deg); CORRADE_COMPARE(q.rotationAxis(), axis);