[GRASS-SVN] r30086 -
grass/branches/releasebranch_6_3/vector/v.generalize
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Feb 11 09:21:14 EST 2008
Author: hamish
Date: 2008-02-11 09:21:14 -0500 (Mon, 11 Feb 2008)
New Revision: 30086
Modified:
grass/branches/releasebranch_6_3/vector/v.generalize/smoothing.c
Log:
use GRASS_EPSILON as standard very small FP value. (merge from trunk)
Modified: grass/branches/releasebranch_6_3/vector/v.generalize/smoothing.c
===================================================================
--- grass/branches/releasebranch_6_3/vector/v.generalize/smoothing.c 2008-02-11 14:17:31 UTC (rev 30085)
+++ grass/branches/releasebranch_6_3/vector/v.generalize/smoothing.c 2008-02-11 14:21:14 UTC (rev 30086)
@@ -166,7 +166,7 @@
continue;
point_assign(Points, j, with_z, &p);
d = point_dist(p, c);
- if (d < 0.0000000001)
+ if (d < GRASS_EPSILON)
continue;
d = (double)1.0 / d;
dists += d;
@@ -314,7 +314,7 @@
/* we always operate on the segment point[i]..point[i+1] */
while (i < n - 1) {
- if (next > length || (length - length_begin < 0.0000001)) { /* segmet i..i+1 is finished or too short */
+ if (next > length || (length - length_begin < GRASS_EPSILON)) { /* segmet i..i+1 is finished or too short */
i++;
if (i >= n - 1)
break; /* we are already out out of line */
More information about the grass-commit
mailing list