diff options
author | Gael Guennebaud <g.gael@free.fr> | 2017-09-06 08:42:14 +0000 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2017-09-06 08:42:14 +0000 |
commit | a91918a105878fafb653a431677aee2e7fe0bf87 (patch) | |
tree | 89e2674cb8e0f0f0754ea592027b58b7b14cb7cd | |
parent | 9c353dd1450c362175213c1018b15b24ac840826 (diff) | |
parent | 6d991a9595ffe22a0924bb8140a37355aca4cccb (diff) |
Merged in infinitei/eigen (pull request PR-328)
bug #1464 : Fixes construction of EulerAngles from 3D vector expression.
Approved-by: Tal Hadad <tal_hd@hotmail.com>
Approved-by: Abhijit Kundu <abhijit.kundu@gatech.edu>
-rw-r--r-- | unsupported/Eigen/src/EulerAngles/EulerAngles.h | 2 | ||||
-rw-r--r-- | unsupported/test/EulerAngles.cpp | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/unsupported/Eigen/src/EulerAngles/EulerAngles.h b/unsupported/Eigen/src/EulerAngles/EulerAngles.h index a5d034d71..e43cdb7fb 100644 --- a/unsupported/Eigen/src/EulerAngles/EulerAngles.h +++ b/unsupported/Eigen/src/EulerAngles/EulerAngles.h @@ -341,7 +341,7 @@ EIGEN_EULER_ANGLES_TYPEDEFS(double, d) // set from a vector of Euler angles template<class System, class Other> - struct eulerangles_assign_impl<System,Other,4,1> + struct eulerangles_assign_impl<System,Other,3,1> { typedef typename Other::Scalar Scalar; static void run(EulerAngles<Scalar, System>& e, const Other& vec) diff --git a/unsupported/test/EulerAngles.cpp b/unsupported/test/EulerAngles.cpp index 79ee72847..500fb2d17 100644 --- a/unsupported/test/EulerAngles.cpp +++ b/unsupported/test/EulerAngles.cpp @@ -278,6 +278,9 @@ void test_EulerAngles() EulerAnglesXYZd onesEd(1, 1, 1); EulerAnglesXYZf onesEf = onesEd.cast<float>(); VERIFY_IS_APPROX(onesEd, onesEf.cast<double>()); + + // Simple Construction from Vector3 test + VERIFY_IS_APPROX(onesEd, EulerAnglesXYZd(Vector3d::Ones())); CALL_SUBTEST_1( eulerangles_manual<float>() ); CALL_SUBTEST_2( eulerangles_manual<double>() ); |