0.3.0 • Published 9 months ago

voronoi-sampler v0.3.0

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

Hi, this is a simple package creating voronoi samplers. The idea is that it you just give it points and values, and then when you use sample function, which gives you value of nearest point.

Example:

    const vs2d = new VoronoiSampler2D<string>();
    vs2d.addPoint(-1, -1, "-");
    vs2d.addPoint( 1,  1, "+");
    console.log(vs2d.sample(-0.5, -0.4)); // will be "-", because point closest to sampled one is (-1, -1), which has value "-"
0.3.0

9 months ago

0.2.2

9 months ago

0.2.1

9 months ago

0.2.0

9 months ago

0.1.0

9 months ago