]> granicus.if.org Git - postgis/commitdiff
Slightly loosen equality tolerance check for point in cone... does this fix cunit...
authorPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 11 Nov 2009 19:35:20 +0000 (19:35 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 11 Nov 2009 19:35:20 +0000 (19:35 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@4788 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwgeodetic.c

index 467975041fd2f8501015d00ed4bea9587665bd3e..75219469ed524c4359d57a8e4026155ae32d3513 100644 (file)
@@ -450,7 +450,7 @@ int edge_point_in_cone(GEOGRAPHIC_EDGE e, GEOGRAPHIC_POINT p)
        ** However, tuning the tolerance value feels like a dangerous hack. 
        ** Fundamentally, the problem is that this test is so sensitive.
        */
-       if ( vp_dot_vcp > vs_dot_vcp || fabs(vp_dot_vcp - vs_dot_vcp) < 1e-17 )
+       if ( vp_dot_vcp > vs_dot_vcp || fabs(vp_dot_vcp - vs_dot_vcp) < 1e-16 )
        {
                LWDEBUG(4, "point is in cone");
                return LW_TRUE;