corrected one bug in closest point

This commit is contained in:
Nico Pietroni 2014-08-01 00:14:25 +00:00
parent cd83a42ea6
commit 565308c80d
1 changed files with 1 additions and 1 deletions

View File

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