bugfix in matrix to Euler-angles function

This commit is contained in:
Gael Guennebaud
2008-12-06 11:04:33 +00:00
parent faf942a947
commit 9c0deb55ca
2 changed files with 6 additions and 5 deletions

View File

@@ -320,7 +320,9 @@ template<typename Scalar> void geometry(void)
VERIFY_IS_APPROX(r2d1d.template cast<Scalar>(),r2d1);
m = q1;
// m.col(1) = Vector3(0,ei_random<Scalar>(),ei_random<Scalar>()).normalized();
// m.col(0) = Vector3(-1,0,0).normalized();
// m.col(2) = m.col(0).cross(m.col(1));
#define VERIFY_EULER(I,J,K, X,Y,Z) { \
Vector3 ea = m.eulerAngles(I,J,K); \
Matrix3 m1 = Matrix3(AngleAxisx(ea[0], Vector3::Unit##X()) * AngleAxisx(ea[1], Vector3::Unit##Y()) * AngleAxisx(ea[2], Vector3::Unit##Z())); \