From a76fbbf39777827200455477a9e3557b6063913f Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 6 Nov 2012 15:25:50 +0100 Subject: Fix bug #314: - remove most of the metaprogramming kung fu in MathFunctions.h (only keep functions that differs from the std) - remove the overloads for array expression that were in the std namespace --- test/geo_quaternion.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'test/geo_quaternion.cpp') diff --git a/test/geo_quaternion.cpp b/test/geo_quaternion.cpp index 6e6922864..c3fceafdf 100644 --- a/test/geo_quaternion.cpp +++ b/test/geo_quaternion.cpp @@ -23,6 +23,7 @@ template T bounded_acos(T v) template void check_slerp(const QuatType& q0, const QuatType& q1) { + using std::abs; typedef typename QuatType::Scalar Scalar; typedef Matrix VectorType; typedef AngleAxis AA; @@ -36,9 +37,9 @@ template void check_slerp(const QuatType& q0, const QuatType& { QuatType q = q0.slerp(t,q1); Scalar theta = AA(q*q0.inverse()).angle(); - VERIFY(internal::abs(q.norm() - 1) < largeEps); + VERIFY(abs(q.norm() - 1) < largeEps); if(theta_tot==0) VERIFY(theta_tot==0); - else VERIFY(internal::abs(theta/theta_tot - t) < largeEps); + else VERIFY(abs(theta/theta_tot - t) < largeEps); } } @@ -47,7 +48,7 @@ template void quaternion(void) /* this test covers the following files: Quaternion.h */ - + using std::abs; typedef Matrix Matrix3; typedef Matrix Vector3; typedef Matrix Vector4; @@ -82,13 +83,13 @@ template void quaternion(void) q2 = AngleAxisx(a, v1.normalized()); // angular distance - Scalar refangle = internal::abs(AngleAxisx(q1.inverse()*q2).angle()); + Scalar refangle = abs(AngleAxisx(q1.inverse()*q2).angle()); if (refangle>Scalar(M_PI)) refangle = Scalar(2)*Scalar(M_PI) - refangle; if((q1.coeffs()-q2.coeffs()).norm() > 10*largeEps) { - VERIFY_IS_MUCH_SMALLER_THAN(internal::abs(q1.angularDistance(q2) - refangle), Scalar(1)); + VERIFY_IS_MUCH_SMALLER_THAN(abs(q1.angularDistance(q2) - refangle), Scalar(1)); } // rotation matrix conversion @@ -109,7 +110,7 @@ template void quaternion(void) // Do not execute the test if the rotation angle is almost zero, or // the rotation axis and v1 are almost parallel. - if (internal::abs(aa.angle()) > 5*test_precision() + if (abs(aa.angle()) > 5*test_precision() && (aa.axis() - v1.normalized()).norm() < 1.99 && (aa.axis() + v1.normalized()).norm() < 1.99) { -- cgit v1.2.3