polygon2.isCounterClockwise

Whether the ring winds counter-clockwise (y up).

Value helperSince 0.4.0

Usage

TypeScript
polygon.isCounterClockwise(): boolean

Returns

true when signedArea() > 0; false for clockwise and for zero-area rings.

Example

TypeScript
Polygon2.rectangle(2, 2).value.isCounterClockwise() // → true

See also