소스 검색

diglib: increase numerical stability

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@71780 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 7 년 전
부모
커밋
0838296f6c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;