[GRASS-SVN] r33083 - grass/branches/develbranch_6/lib/vector/vedit
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 26 04:58:33 EDT 2008
Author: martinl
Date: 2008-08-26 04:58:32 -0400 (Tue, 26 Aug 2008)
New Revision: 33083
Modified:
grass/branches/develbranch_6/lib/vector/vedit/break.c
Log:
veditlib: bug fix in Vedit_connect_lines()
Modified: grass/branches/develbranch_6/lib/vector/vedit/break.c
===================================================================
--- grass/branches/develbranch_6/lib/vector/vedit/break.c 2008-08-26 08:17:18 UTC (rev 33082)
+++ grass/branches/develbranch_6/lib/vector/vedit/break.c 2008-08-26 08:58:32 UTC (rev 33083)
@@ -266,10 +266,14 @@
NULL, NULL, NULL, &angle_t,
NULL) > 0) {
angle = angle_t - angle_f;
- dist_p = dist / sin(angle);
+ dist_p = fabs(dist / sin(angle));
- if (first)
- angle_f -= M_PI;
+ if (first) {
+ if (angle_f < 0)
+ angle_f -= M_PI;
+ else
+ angle_f += M_PI;
+ }
x1 = x + dist_p * cos(angle_f);
y1 = y + dist_p * sin(angle_f);
More information about the grass-commit
mailing list