Corrected 1 bug in DistancePoint2Box2 function

This commit is contained in:
Nico Pietroni 2009-06-30 16:07:13 +00:00
parent f4bc92f6f7
commit 10c5f72af2
1 changed files with 1 additions and 1 deletions

View File

@ -260,7 +260,7 @@ ScalarType DistancePoint2Box2(const Point2<ScalarType> &test,
const Box2<ScalarType> &bbox)
{
///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()))
return ((test-bbox.min).Norm());
else