aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Geometry/ParametrizedLine.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2008-10-25 23:10:21 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2008-10-25 23:10:21 +0000
commitec0a423862d74cea10e2b33f7b37f43957adb465 (patch)
tree041c07641467df69289ef429fa7e3ce3a49752ea /Eigen/src/Geometry/ParametrizedLine.h
parent505ce85814f9291b7d242ef57582d7b15e673f26 (diff)
Add isApprox in Geometry module's classes.
Complete unit tests wrt previous commits.
Diffstat (limited to 'Eigen/src/Geometry/ParametrizedLine.h')
-rw-r--r--Eigen/src/Geometry/ParametrizedLine.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Eigen/src/Geometry/ParametrizedLine.h b/Eigen/src/Geometry/ParametrizedLine.h
index e7d336e62..80ce72dcd 100644
--- a/Eigen/src/Geometry/ParametrizedLine.h
+++ b/Eigen/src/Geometry/ParametrizedLine.h
@@ -122,6 +122,13 @@ public:
m_direction = other.direction().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 ParametrizedLine& other, typename NumTraits<Scalar>::Real prec = precision<Scalar>()) const
+ { return m_origin.isApprox(other.m_origin, prec) && m_direction.isApprox(other.m_direction, prec); }
+
protected:
VectorType m_origin, m_direction;