Browse Source

diglib: comments, documentation

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@52587 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 12 years ago
parent
commit
07035830f2
2 changed files with 5 additions and 2 deletions
  1. 1 1
      lib/vector/diglib/plus_area.c
  2. 4 1
      lib/vector/diglib/plus_node.c

+ 1 - 1
lib/vector/diglib/plus_area.c

@@ -453,7 +453,7 @@ int dig_del_area(struct Plus_head *plus, int area)
  * \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

+ 4 - 1
lib/vector/diglib/plus_node.c

@@ -28,6 +28,9 @@ static double dist_squared(double, double, double, double);
  *
  * '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 @@ dig_node_add_line(struct Plus_head *plus, int nodeid, int lineid,
 
     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];