Skip to content
Snippets Groups Projects
Commit 2acfbc6d authored by Andreas Schenk's avatar Andreas Schenk
Browse files

Added additional unit test for Rotation3 with non-zero origin

parent 9d6b2d4e
Branches
Tags
No related merge requests found
......@@ -202,6 +202,12 @@ BOOST_AUTO_TEST_CASE(rotation3)
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(Real(-sin(30.0*M_PI/180.0)), Real(vrot[2]), Real(1e-5));
Rotation3 r2(Vec3(0,1,0), 30.0*M_PI/180.0,Vec3(2,0,0));
Vec3 vrot2=r2.Apply(v);
BOOST_CHECK_CLOSE(2.0-Real(cos(30.0*M_PI/180.0)), Real(vrot2[0]), Real(1e-5));
BOOST_CHECK_SMALL(vrot2[1],float(1e-5));
BOOST_CHECK_CLOSE(Real(sin(30.0*M_PI/180.0)), Real(vrot2[2]), Real(1e-5));
}
BOOST_AUTO_TEST_SUITE_END()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment