Fixed a warning.

Transform::Identity() is now returning a Transform.
This commit is contained in:
Hauke Heibel 2010-02-03 09:46:27 +01:00
parent 8861dce7ee
commit 05837be8fb
2 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -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>