diff --git a/packages/poisson/src/index.ts b/packages/poisson/src/index.ts index fbfea199b3..0ed2d62e89 100644 --- a/packages/poisson/src/index.ts +++ b/packages/poisson/src/index.ts @@ -1,5 +1,5 @@ import { isNumber } from "@thi.ng/checks"; -import { ISpatialAccel } from "@thi.ng/geom-api"; +import { ISpatialSet } from "@thi.ng/geom-api"; import { IRandom, SYSTEM } from "@thi.ng/random"; import { jitter as _jitter, ReadonlyVec, Vec } from "@thi.ng/vectors"; @@ -42,7 +42,7 @@ export interface PoissonOpts { * distributing the process over multiple invocations of smaller * sample sizes (see `max` option) to avoid long delays. */ - index: ISpatialAccel; + index: ISpatialSet; /** * Max number of samples to produce. Must be given, no default. */ @@ -107,7 +107,7 @@ export const samplePoisson = (_opts: PoissonOpts) => { i = iter; while (i-- > 0) { if (!index.has(pos, d)) { - index.add(pos, d); + index.add(pos, 0); samples.push(pos); failed = 0; num--;