18 lines
688 B
TypeScript
Executable File
18 lines
688 B
TypeScript
Executable File
import { Feature, LineString, Position } from "@turf/helpers";
|
|
/**
|
|
* Takes a ring and return true or false whether or not the ring is clockwise or counter-clockwise.
|
|
*
|
|
* @name booleanClockwise
|
|
* @param {Feature<LineString>|LineString|Array<Array<number>>} line to be evaluated
|
|
* @returns {boolean} true/false
|
|
* @example
|
|
* var clockwiseRing = turf.lineString([[0,0],[1,1],[1,0],[0,0]]);
|
|
* var counterClockwiseRing = turf.lineString([[0,0],[1,0],[1,1],[0,0]]);
|
|
*
|
|
* turf.booleanClockwise(clockwiseRing)
|
|
* //=true
|
|
* turf.booleanClockwise(counterClockwiseRing)
|
|
* //=false
|
|
*/
|
|
export default function booleanClockwise(line: Feature<LineString> | LineString | Position[]): boolean;
|