corrected one bug in closest point
This commit is contained in:
parent
cd83a42ea6
commit
565308c80d
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue