Skip to content

Turfjs/turf-is-clockwise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

turf-isClockwise

Build Status

Takes a ring and return true or false whether or not the ring is clockwise or counter-clockwise.

###Install

npm install turf-is-clockwise

###Parameters

name description
ring an array of coordinates

###Usage

isClockwise(ring)

###Example

var isClockwise = require('turf-is-clockwise')

var clockwiseRing = [[0,0],[1,1],[1,0],[0,0]]
var counterClockwiseRing = [[0,0],[1,0],[1,1],[0,0]]

var isCW = isClockwise(clockwiseRing)
var counterCW = isClockwise(counterClockwiseRing)

console.log(isCW) // true
console.log(counterCW) // false

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published