From dacb469bc93b5b8578afad19d327606659ec3a55 Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Thu, 5 May 2016 13:35:45 +0200 Subject: Enable and fix -Wdouble-conversion warnings --- test/geo_quaternion.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/geo_quaternion.cpp') diff --git a/test/geo_quaternion.cpp b/test/geo_quaternion.cpp index 761bb52b4..25130c19a 100644 --- a/test/geo_quaternion.cpp +++ b/test/geo_quaternion.cpp @@ -30,7 +30,7 @@ template void check_slerp(const QuatType& q0, const QuatType& Scalar largeEps = test_precision(); Scalar theta_tot = AA(q1*q0.inverse()).angle(); - if(theta_tot>EIGEN_PI) + if(theta_tot>Scalar(EIGEN_PI)) theta_tot = Scalar(2.*EIGEN_PI)-theta_tot; for(Scalar t=0; t<=Scalar(1.001); t+=Scalar(0.1)) { @@ -115,8 +115,8 @@ 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 (abs(aa.angle()) > 5*test_precision() - && (aa.axis() - v1.normalized()).norm() < 1.99 - && (aa.axis() + v1.normalized()).norm() < 1.99) + && (aa.axis() - v1.normalized()).norm() < Scalar(1.99) + && (aa.axis() + v1.normalized()).norm() < Scalar(1.99)) { VERIFY_IS_NOT_APPROX(q1 * v1, Quaternionx(AngleAxisx(aa.angle()*2,aa.axis())) * v1); } -- cgit v1.2.3