corrected return value of closest point
This commit is contained in:
parent
5accefa385
commit
0e3d2abcfd
|
@ -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>
|
||||||
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);
|
ScalarType t = r.Projection(p);
|
||||||
if (t<0) return r.Origin();
|
if (t<0) return r.Origin();
|
||||||
|
|
Loading…
Reference in New Issue