📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

turf-is-clockwise

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turf-is-clockwise

turf isClockwise module

1.0.0
latest
Source
npm
Version published
Weekly downloads
616
6.21%
Maintainers
1
Weekly downloads
 
Created
Source

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

namedescription
ringan 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

Keywords

clockwise

FAQs

Package last updated on 11 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts