[GRASS-SVN] r33084 - grass/trunk/lib/vector/vedit
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 26 04:59:58 EDT 2008
Author: martinl
Date: 2008-08-26 04:59:58 -0400 (Tue, 26 Aug 2008)
New Revision: 33084
Modified:
grass/trunk/lib/vector/vedit/break.c
Log:
veditlib: bug fix in Vedit_connect_lines()
(merge from devbr6, r33083)
Modified: grass/trunk/lib/vector/vedit/break.c
===================================================================
--- grass/trunk/lib/vector/vedit/break.c 2008-08-26 08:58:32 UTC (rev 33083)
+++ grass/trunk/lib/vector/vedit/break.c 2008-08-26 08:59:58 UTC (rev 33084)
@@ -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