diff options
author | Gael Guennebaud <g.gael@free.fr> | 2008-10-25 23:10:21 +0000 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2008-10-25 23:10:21 +0000 |
commit | ec0a423862d74cea10e2b33f7b37f43957adb465 (patch) | |
tree | 041c07641467df69289ef429fa7e3ce3a49752ea /Eigen/src/Geometry/Translation.h | |
parent | 505ce85814f9291b7d242ef57582d7b15e673f26 (diff) |
Add isApprox in Geometry module's classes.
Complete unit tests wrt previous commits.
Diffstat (limited to 'Eigen/src/Geometry/Translation.h')
-rw-r--r-- | Eigen/src/Geometry/Translation.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Eigen/src/Geometry/Translation.h b/Eigen/src/Geometry/Translation.h index c2e626112..8dce5dd4c 100644 --- a/Eigen/src/Geometry/Translation.h +++ b/Eigen/src/Geometry/Translation.h @@ -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 */ |