diff options
author | 2008-10-25 23:10:21 +0000 | |
---|---|---|
committer | 2008-10-25 23:10:21 +0000 | |
commit | ec0a423862d74cea10e2b33f7b37f43957adb465 (patch) | |
tree | 041c07641467df69289ef429fa7e3ce3a49752ea /Eigen/src/Geometry/Hyperplane.h | |
parent | 505ce85814f9291b7d242ef57582d7b15e673f26 (diff) |
Add isApprox in Geometry module's classes.
Complete unit tests wrt previous commits.
Diffstat (limited to 'Eigen/src/Geometry/Hyperplane.h')
-rw-r--r-- | Eigen/src/Geometry/Hyperplane.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Eigen/src/Geometry/Hyperplane.h b/Eigen/src/Geometry/Hyperplane.h index d3327a418..a45268f07 100644 --- a/Eigen/src/Geometry/Hyperplane.h +++ b/Eigen/src/Geometry/Hyperplane.h @@ -256,6 +256,13 @@ public: inline explicit Hyperplane(const Hyperplane<OtherScalarType,AmbientDimAtCompileTime>& other) { m_coeffs = other.coeffs().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 Hyperplane& other, typename NumTraits<Scalar>::Real prec = precision<Scalar>()) const + { return m_coeffs.isApprox(other.m_coeffs, prec); } + protected: Coefficients m_coeffs; |