[GRASS-SVN] r52587 - grass/trunk/lib/vector/diglib

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Aug 7 11:55:56 PDT 2012


Author: mmetz
Date: 2012-08-07 11:55:56 -0700 (Tue, 07 Aug 2012)
New Revision: 52587

Modified:
   grass/trunk/lib/vector/diglib/plus_area.c
   grass/trunk/lib/vector/diglib/plus_node.c
Log:
diglib: comments, documentation

Modified: grass/trunk/lib/vector/diglib/plus_area.c
===================================================================
--- grass/trunk/lib/vector/diglib/plus_area.c	2012-08-07 18:41:05 UTC (rev 52586)
+++ grass/trunk/lib/vector/diglib/plus_area.c	2012-08-07 18:55:56 UTC (rev 52587)
@@ -453,7 +453,7 @@
  * \brief Find number line of next angle to follow an line
  *
  * Assume that lines are sorted in increasing angle order and angles
- * of points and degenerated lines are set to 9 (ignored).
+ * of points and degenerated lines are set to -9 (ignored).
  *
  * \param[in] plus pointer to Plus_head structure
  * \param[in] current_line current line id, negative if request for node 2

Modified: grass/trunk/lib/vector/diglib/plus_node.c
===================================================================
--- grass/trunk/lib/vector/diglib/plus_node.c	2012-08-07 18:41:05 UTC (rev 52586)
+++ grass/trunk/lib/vector/diglib/plus_node.c	2012-08-07 18:55:56 UTC (rev 52587)
@@ -28,6 +28,9 @@
  *
  * 'node' must of course already exist space will be alloced to add 'line' to array
  *
+ * Lines are sorted in increasing angle order and
+ * degenerated lines are set to -9 (ignored).
+ * 
  * \param[in] plus pointer to Plus_head structure
  * \param[in] nodeid node id
  * \param[in] lineid line id
@@ -68,7 +71,7 @@
 
     i = nlines;
     while (i > 0) {
-	if (angle > node->angles[i - 1])
+	if (angle >= node->angles[i - 1])
 	    break;
 	node->angles[i] = node->angles[i - 1];
 	node->lines[i] = node->lines[i - 1];



More information about the grass-commit mailing list