Package Exports
- robust-point-in-simplex
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (robust-point-in-simplex) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
robust-point-in-simplex
Exact point in simplex predicate.
Example
var pointInSimplex = require("robust-point-in-simplex")
var simplex = [
[0,0],
[0,1],
[1,0]
]
console.log(pointInSimplex(simplex, [0.25, 0.25]))require("robust-point-in-simplex")(simplex, point)
Exactly tests if a given point is contained in a simplex.
simplexis an array ofn+1pointspointis a lengthnarray of floats
Returns An integer indicating where the point lies on the simplex
>0if the point is contained in the simplex<0if the point is outside the simplex0if the point lies on the boundary of the simplex
Credits
(c) 2013 Mikola Lysenko. MIT License