: ccw = isPolygonCCW (p)
: ccw = isPolygonCCW (px, py)

Returns true if the polygon p are oriented Counter-Clockwise.

p is a N-by-2 array containing coordinates of vertices. The coordinates of the vertices of the polygon can also be given as two N-by-1 arrays px, py.

Optional third argument library can be one of "geometry" or "clipper". In the latter case the potentially faster Clipper polygon library will be invoked to assess winding directions. The default is "geometry".

If any polygon is self-crossing, the result is undefined.

If p is a cell, each element is considered a polygon, the resulting cww is a cell of the same size.

See also: polygonArea.

Package: geometry