Checks if a point is contained in a simplex
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
LICENSE
README.md
package.json
pis.js

README.md

point-in-simplex

Checks if a point is contained in a simplex

Usage

First install:

npm install point-in-simplex

Then use as follows:

var pis = require("point-in-simplex")

var triangle = [[0,0], [0,1], [1,0]]

console.log(pis(triangle, [0.2, 0.2])) // Prints: true
console.log(pis(triangle, [100, 100])) // Prints: false

Credits

(c) 2013 Mikola Lysenko. MIT License