]> granicus.if.org Git - postgis/commitdiff
Fix isccw to return correct ccw answer.
authorPaul Ramsey <pramsey@cleverelephant.ca>
Sun, 12 Mar 2006 17:20:08 +0000 (17:20 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Sun, 12 Mar 2006 17:20:08 +0000 (17:20 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@2317 b70326c6-7e19-0410-871a-916f4a2858ee

lwgeom/lwgeom_api.c

index f11d36ba497572a74d0e85aeb400dbbe1ea31128..70468652bfaa04eed57a27189120e6247bfcb46e 100644 (file)
@@ -1867,7 +1867,7 @@ ptarray_isccw(const POINTARRAY *pa)
        {
                getPoint2d_p(pa, i, &p1);
                getPoint2d_p(pa, i+1, &p2);
-               area += (p1.x * p2.y) - (p1.y * p2.x);
+               area += (p1.y * p2.x) - (p1.x * p2.y);
        }
        if ( area > 0 ) return 0;
        else return 1;