aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Geometry/ParametrizedLine.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2011-06-27 13:15:01 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2011-06-27 13:15:01 +0200
commitc98cd5e564f75be2edc7c5d18491058d025fa796 (patch)
tree17e759636e28d6aed5ffb937b4908cd7a34af1f3 /Eigen/src/Geometry/ParametrizedLine.h
parent0b308e79c4731c093a8bbe2adc3bb9dc4ff3eb12 (diff)
fix constness of intersection methods (bug #309)
Diffstat (limited to 'Eigen/src/Geometry/ParametrizedLine.h')
-rw-r--r--Eigen/src/Geometry/ParametrizedLine.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/Geometry/ParametrizedLine.h b/Eigen/src/Geometry/ParametrizedLine.h
index 1475802ab..b90f9c088 100644
--- a/Eigen/src/Geometry/ParametrizedLine.h
+++ b/Eigen/src/Geometry/ParametrizedLine.h
@@ -107,7 +107,7 @@ public:
{ return origin() + direction().dot(p-origin()) * direction(); }
template <int OtherOptions>
- Scalar intersection(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane);
+ Scalar intersection(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const;
/** \returns \c *this with scalar type casted to \a NewScalarType
*
@@ -159,7 +159,7 @@ inline ParametrizedLine<_Scalar, _AmbientDim,_Options>::ParametrizedLine(const H
*/
template <typename _Scalar, int _AmbientDim, int _Options>
template <int OtherOptions>
-inline _Scalar ParametrizedLine<_Scalar, _AmbientDim,_Options>::intersection(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane)
+inline _Scalar ParametrizedLine<_Scalar, _AmbientDim,_Options>::intersection(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const
{
return -(hyperplane.offset()+hyperplane.normal().dot(origin()))
/ hyperplane.normal().dot(direction());