Socket
Socket
Sign inDemoInstall

turf-is-clockwise

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    turf-is-clockwise

turf isClockwise module


Version published
Maintainers
1
Install size
5.06 kB
Created

Readme

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

FAQs

Last updated on 11 Dec 2014

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc