diff --git a/modules/geom/tests/test_composite3.cc b/modules/geom/tests/test_composite3.cc index 5602df4dda6492cd7f818066286a4355c40d81df..f5cd5cf6bfbe0f411490361103e9bf0e13b5c0b9 100644 --- a/modules/geom/tests/test_composite3.cc +++ b/modules/geom/tests/test_composite3.cc @@ -199,9 +199,9 @@ BOOST_AUTO_TEST_CASE(rotation3) Vec3 v(1,0,0); Rotation3 r(Vec3(0,1,0), 30.0*M_PI/180.0); Vec3 vrot=r.Apply(v); - BOOST_CHECK_CLOSE(cos(30.0*M_PI/180.0),vrot[0],float(1e-5)); + BOOST_CHECK_CLOSE(Real(cos(30.0*M_PI/180.0)), Real(vrot[0]), Real(1e-5)); BOOST_CHECK_SMALL(vrot[1],float(1e-5)); - BOOST_CHECK_CLOSE(-sin(30.0*M_PI/180.0),vrot[2],float(1e-5)); + BOOST_CHECK_CLOSE(Real(-sin(30.0*M_PI/180.0)), Real(vrot[2]), Real(1e-5)); } BOOST_AUTO_TEST_SUITE_END() diff --git a/modules/geom/tests/test_quat.cc b/modules/geom/tests/test_quat.cc index 0869fd518912d3f55f3c6bfd52b12955b238a391..ccaf9ab2dd4aa7d4730cfd511dcdd7d0ad9fe811 100644 --- a/modules/geom/tests/test_quat.cc +++ b/modules/geom/tests/test_quat.cc @@ -31,16 +31,16 @@ BOOST_AUTO_TEST_CASE(init_quat) { // default Quat q1; - BOOST_CHECK_CLOSE(q1.w,1.0,1.0e-5); - BOOST_CHECK_CLOSE(q1.x,0.0,1.0e-5); - BOOST_CHECK_CLOSE(q1.y,0.0,1.0e-5); - BOOST_CHECK_CLOSE(q1.z,0.0,1.0e-5); + BOOST_CHECK_CLOSE(Real(q1.w), Real(1.0), Real(1.0e-5)); + BOOST_CHECK_CLOSE(Real(q1.x), Real(0.0), Real(1.0e-5)); + BOOST_CHECK_CLOSE(Real(q1.y), Real(0.0), Real(1.0e-5)); + BOOST_CHECK_CLOSE(Real(q1.z), Real(0.0), Real(1.0e-5)); Quat q2(2.0,3.0,4.0,5.0); - BOOST_CHECK_CLOSE(q2.w,2.0,1.0e-5); - BOOST_CHECK_CLOSE(q2.x,3.0,1.0e-5); - BOOST_CHECK_CLOSE(q2.y,4.0,1.0e-5); - BOOST_CHECK_CLOSE(q2.z,5.0,1.0e-5); + BOOST_CHECK_CLOSE(Real(q2.w), Real(2.0), Real(1.0e-5)); + BOOST_CHECK_CLOSE(Real(q2.x), Real(3.0), Real(1.0e-5)); + BOOST_CHECK_CLOSE(Real(q2.y), Real(4.0), Real(1.0e-5)); + BOOST_CHECK_CLOSE(Real(q2.z), Real(5.0), Real(1.0e-5)); } BOOST_AUTO_TEST_CASE(quat_rotate) @@ -48,9 +48,9 @@ BOOST_AUTO_TEST_CASE(quat_rotate) Vec3 v(1,0,0); Quat q(30.0*M_PI/180.0,Vec3(0,1,0)); Vec3 vrot=q.Rotate(v); - BOOST_CHECK_CLOSE(cos(30.0*M_PI/180.0),vrot[0],float(1e-5)); + BOOST_CHECK_CLOSE(Real(cos(30.0*M_PI/180.0)), Real(vrot[0]), Real(1e-5)); BOOST_CHECK_SMALL(vrot[1],float(1e-5)); - BOOST_CHECK_CLOSE(-sin(30.0*M_PI/180.0),vrot[2],float(1e-5)); + BOOST_CHECK_CLOSE(Real(-sin(30.0*M_PI/180.0)), Real(vrot[2]), Real(1e-5)); }