From 6d991a9595ffe22a0924bb8140a37355aca4cccb Mon Sep 17 00:00:00 2001 From: Abhijit Kundu Date: Wed, 30 Aug 2017 13:26:30 -0400 Subject: [PATCH] bug #1464 : Fixes construction of EulerAngles from 3D vector expression. --- unsupported/Eigen/src/EulerAngles/EulerAngles.h | 2 +- unsupported/test/EulerAngles.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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 - struct eulerangles_assign_impl + struct eulerangles_assign_impl { typedef typename Other::Scalar Scalar; static void run(EulerAngles& 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(); VERIFY_IS_APPROX(onesEd, onesEf.cast()); + + // Simple Construction from Vector3 test + VERIFY_IS_APPROX(onesEd, EulerAnglesXYZd(Vector3d::Ones())); CALL_SUBTEST_1( eulerangles_manual() ); CALL_SUBTEST_2( eulerangles_manual() );