Socket
Socket
Sign inDemoInstall

compare-oriented-cell

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

compare-oriented-cell

Test if two sets of integers are equal up to an even permutation


Version published
Maintainers
1
Created
Source

compare-oriented-cell

This module defines an ordering on oriented cells. It is similar to compare-cell, except that it considers cells which are oriented clockwise/counter clockwise to be distinct.

Example

var compare = require('compare-oriented-cell')

//Create 3 triangles
var a = [0, 1, 2]
var b = [1, 2, 0]
var c = [1, 0, 2]

//Triangle a and b are equivalent up to an even permutation
console.log(compare(a, b) === 0)

//Triangle a and c are different as they not oriented the same
console.log(compare(a, c) === 0)

Install

npm i compare-oriented-cell

API

require('compare-oriented-cell')(a, b)

Compares two oriented cells.

  • a, b are lists of integers

Returns +/-1 if a and b are different, 0 otherwise

License

(c) 2015 Mikola Lysenko. MIT License

Keywords

FAQs

Package last updated on 20 Jun 2015

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc