]> granicus.if.org Git - postgis/commitdiff
Apply the epsilon fix to bounding circle (references #3930)
authorPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 20 Dec 2017 14:28:56 +0000 (14:28 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 20 Dec 2017 14:28:56 +0000 (14:28 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@16165 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwboundingcircle.c

index 1cdbe41ff51d2acef3ceebf47e43bb53b4f5bee8..ba6bc40d79a7efdc0769192bc7fcbc31cad9a0d9 100644 (file)
@@ -87,7 +87,7 @@ point_inside_circle(const POINT2D* p, const LWBOUNDINGCIRCLE* c)
        if (!c)
                return LW_FALSE;
 
-       if (distance2d_pt_pt(p, c->center) > c->radius)
+       if (distance2d_pt_pt(p, c->center) - c->radius > DBL_EPSILON)
                return LW_FALSE;
 
        return LW_TRUE;