From 3b57d530a43ed2828e4759f0f8119594211bab54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 5 Jan 2013 23:44:30 +0100 Subject: [PATCH] Math: test also properties of normalized Quaternion. --- src/Math/Test/MathQuaternionTest.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Math/Test/MathQuaternionTest.cpp b/src/Math/Test/MathQuaternionTest.cpp index 362ee3825..24fccec56 100644 --- a/src/Math/Test/MathQuaternionTest.cpp +++ b/src/Math/Test/MathQuaternionTest.cpp @@ -75,8 +75,9 @@ void QuaternionTest::length() { } void QuaternionTest::normalized() { - CORRADE_COMPARE(Quaternion({1.0f, 3.0f, -2.0f}, -4.0f).normalized(), - Quaternion({1.0f, 3.0f, -2.0f}, -4.0f)/std::sqrt(30.0f)); + Quaternion normalized = Quaternion({1.0f, 3.0f, -2.0f}, -4.0f).normalized(); + CORRADE_COMPARE(normalized.length(), 1.0f); + CORRADE_COMPARE(normalized, Quaternion({1.0f, 3.0f, -2.0f}, -4.0f)/std::sqrt(30.0f)); } void QuaternionTest::conjugated() {