fix bug in hit_test for points, allowing possibility of hit if tolerance is fractional (most cases)

This commit is contained in:
Dane Springmeyer 2011-03-13 22:15:52 +00:00
parent 578b434f4d
commit aea93fe1f9

View file

@ -314,7 +314,7 @@ public:
// Handle points // Handle points
double x0, y0; double x0, y0;
cont_.get_vertex(0, &x0, &y0); cont_.get_vertex(0, &x0, &y0);
return distance(x, y, x0, y0) <= abs(tol); return distance(x, y, x0, y0) <= fabs(tol);
} else if (cont_.size() > 1) { } else if (cont_.size() > 1) {
bool inside=false; bool inside=false;
double x0=0; double x0=0;