Add isApprox in Geometry module's classes.

Complete unit tests wrt previous commits.
This commit is contained in:
Gael Guennebaud
2008-10-25 23:10:21 +00:00
parent 505ce85814
commit ec0a423862
12 changed files with 151 additions and 42 deletions

View File

@@ -145,6 +145,13 @@ public:
inline explicit Translation(const Translation<OtherScalarType,Dim>& other)
{ m_coeffs = other.vector().template cast<OtherScalarType>(); }
/** \returns \c true if \c *this is approximately equal to \a other, within the precision
* determined by \a prec.
*
* \sa MatrixBase::isApprox() */
bool isApprox(const Translation& other, typename NumTraits<Scalar>::Real prec = precision<Scalar>()) const
{ return m_coeffs.isApprox(other.m_coeffs, prec); }
};
/** \addtogroup GeometryModule */