Explorar o código

diglib: increase numerical stability

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@71780 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz %!s(int64=7) %!d(string=hai) anos
pai
achega
0838296f6c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/vector/diglib/inside.c

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

@@ -26,7 +26,7 @@ dig_x_intersect(double beg_x,
     /* assumes beg_y != end_y */
 
     /* sort for numerical stability */
-    if (end_y < beg_y) {
+    if (end_x < beg_x || (end_x == beg_x && end_y < beg_y)) {
 	b = end_x;
 	end_x = beg_x;
 	beg_x = b;