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

Returns true if the polygon p are oriented 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 arrways px, py.

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

If x and y contain multiple contours, either in NaN-separated vector form or in cell array form, ispolycw returns a logical array containing one true or false value per contour.

If a contour contains two or fewer vertices, ispolycw returns true.

If points is a cell, each element is considered a polygon, the resulting cw array has the same shape as the cell.

See also: polygonArea.

Package: geometry