Corrected 1 bug in DistancePoint2Box2 function
This commit is contained in:
parent
f4bc92f6f7
commit
10c5f72af2
|
@ -260,7 +260,7 @@ ScalarType DistancePoint2Box2(const Point2<ScalarType> &test,
|
||||||
const Box2<ScalarType> &bbox)
|
const Box2<ScalarType> &bbox)
|
||||||
{
|
{
|
||||||
///test possible position respect to bounding box
|
///test possible position respect to bounding box
|
||||||
if (!bbox.IsIN(test)){
|
if (!bbox.IsIn(test)){
|
||||||
if ((test.X()<=bbox.min.X())&&(test.Y()<=bbox.min.Y()))
|
if ((test.X()<=bbox.min.X())&&(test.Y()<=bbox.min.Y()))
|
||||||
return ((test-bbox.min).Norm());
|
return ((test-bbox.min).Norm());
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue