aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Eigen/src/Geometry/Quaternion.h3
-rw-r--r--test/geo_quaternion.cpp3
2 files changed, 5 insertions, 1 deletions
diff --git a/Eigen/src/Geometry/Quaternion.h b/Eigen/src/Geometry/Quaternion.h
index b8b41ebcf..285a93c15 100644
--- a/Eigen/src/Geometry/Quaternion.h
+++ b/Eigen/src/Geometry/Quaternion.h
@@ -377,7 +377,8 @@ template <class Derived>
template <class OtherDerived>
EIGEN_STRONG_INLINE Derived& QuaternionBase<Derived>::operator*= (const QuaternionBase<OtherDerived>& other)
{
- return (derived() = derived() * other.derived());
+ derived() = derived() * other.derived();
+ return derived();
}
/** Rotation of a vector by a quaternion.
diff --git a/test/geo_quaternion.cpp b/test/geo_quaternion.cpp
index 052c01fbf..311ffd2ec 100644
--- a/test/geo_quaternion.cpp
+++ b/test/geo_quaternion.cpp
@@ -59,6 +59,9 @@ template<typename Scalar> void quaternion(void)
q1.coeffs().setRandom();
VERIFY_IS_APPROX(q1.coeffs(), (q1*q2).coeffs());
+ // concatenation
+ q1 *= q2;
+
q1 = AngleAxisx(a, v0.normalized());
q2 = AngleAxisx(a, v1.normalized());