robust-point-in-simplex
Exact point in simplex predicate.
Example
var pointInSimplex = var simplex = 00 01 10 console
require("robust-point-in-simplex")(simplex, point)
Exactly tests if a given point is contained in a simplex.
simplex
is an array ofn+1
pointspoint
is a lengthn
array of floats
Returns An integer indicating where the point lies on the simplex
>0
if the point is contained in the simplex<0
if the point is outside the simplex0
if the point lies on the boundary of the simplex
Credits
(c) 2013 Mikola Lysenko. MIT License