compare-oriented-cell

WebJar for compare-oriented-cell

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

compare-oriented-cell
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

compare-oriented-cell
WebJar for compare-oriented-cell
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/mikolalysenko/compare-oriented-cell

Download compare-oriented-cell

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/compare-oriented-cell/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>compare-oriented-cell</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/compare-oriented-cell/
implementation 'org.webjars.npm:compare-oriented-cell:1.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/compare-oriented-cell/
implementation ("org.webjars.npm:compare-oriented-cell:1.0.1")
'org.webjars.npm:compare-oriented-cell:jar:1.0.1'
<dependency org="org.webjars.npm" name="compare-oriented-cell" rev="1.0.1">
  <artifact name="compare-oriented-cell" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='compare-oriented-cell', version='1.0.1')
)
libraryDependencies += "org.webjars.npm" % "compare-oriented-cell" % "1.0.1"
[org.webjars.npm/compare-oriented-cell "1.0.1"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : cell-orientation jar [1.0.1,2)
org.webjars.npm : compare-cell jar [1.0.0,2)

Project Modules

There are no modules declared in this project.

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

Versions

Version
1.0.1