aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src
diff options
context:
space:
mode:
Diffstat (limited to 'Eigen/src')
-rw-r--r--Eigen/src/Geometry/Quaternion.h2
-rw-r--r--Eigen/src/Geometry/Transform.h9
2 files changed, 8 insertions, 3 deletions
diff --git a/Eigen/src/Geometry/Quaternion.h b/Eigen/src/Geometry/Quaternion.h
index 285a93c15..98b91e2de 100644
--- a/Eigen/src/Geometry/Quaternion.h
+++ b/Eigen/src/Geometry/Quaternion.h
@@ -573,7 +573,7 @@ QuaternionBase<Derived>::angularDistance(const QuaternionBase<OtherDerived>& oth
double d = ei_abs(this->dot(other));
if (d>=1.0)
return Scalar(0);
- return Scalar(2) * std::acos(d);
+ return static_cast<Scalar>(2 * std::acos(d));
}
/** \returns the spherical linear interpolation between the two quaternions
diff --git a/Eigen/src/Geometry/Transform.h b/Eigen/src/Geometry/Transform.h
index b945ea43f..309c1e1fd 100644
--- a/Eigen/src/Geometry/Transform.h
+++ b/Eigen/src/Geometry/Transform.h
@@ -345,9 +345,14 @@ public:
/** \sa MatrixBase::setIdentity() */
void setIdentity() { m_matrix.setIdentity(); }
- static const typename MatrixType::IdentityReturnType Identity()
+
+ /**
+ * \brief Returns an identity transformation.
+ * \todo In the future this function should be returning a Transform expression.
+ */
+ static const Transform Identity()
{
- return MatrixType::Identity();
+ return Transform(MatrixType::Identity());
}
template<typename OtherDerived>