From: Paul Ramsey Date: Wed, 11 Nov 2009 19:35:20 +0000 (+0000) Subject: Slightly loosen equality tolerance check for point in cone... does this fix cunit... X-Git-Tag: 1.5.0b1~258 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8d538ca180bdc9f109a975f871978df20c2c25b2;p=postgis Slightly loosen equality tolerance check for point in cone... does this fix cunit regressions? git-svn-id: http://svn.osgeo.org/postgis/trunk@4788 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/lwgeodetic.c b/liblwgeom/lwgeodetic.c index 467975041..75219469e 100644 --- a/liblwgeom/lwgeodetic.c +++ b/liblwgeom/lwgeodetic.c @@ -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;