corrected return value of closest point

This commit is contained in:
Nico Pietroni 2012-06-22 14:23:33 +00:00
parent 5accefa385
commit 0e3d2abcfd
1 changed files with 1 additions and 1 deletions

View File

@ -186,7 +186,7 @@ typedef Ray2<double,true> Ray2dN;
/// returns closest point
template <class ScalarType, bool NORM>
Point3<ScalarType> ClosestPoint( Ray2<ScalarType,NORM> r, const Point3<ScalarType> & p)
Point2<ScalarType> ClosestPoint( Ray2<ScalarType,NORM> r, const Point3<ScalarType> & p)
{
ScalarType t = r.Projection(p);
if (t<0) return r.Origin();