Skip to content

Commit

Permalink
fix(geom): fix regression/update buffer arg types
Browse files Browse the repository at this point in the history
- switch from Vec => NumericArray for backing buffers
- update remap() / collateWith()
  • Loading branch information
postspectacular committed Feb 1, 2021
1 parent 27a3614 commit 9cf5e5d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/geom/src/internal/collate.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import type { StridedVec, Vec } from "@thi.ng/vectors";
import type { NumericArray } from "@thi.ng/api";
import type { StridedVec } from "@thi.ng/vectors";

export interface CollateOpts {
buf: Vec;
buf: NumericArray;
start: number;
cstride: number;
estride: number;
}

export const remap = (
buf: Vec,
buf: NumericArray,
pts: StridedVec[],
start: number,
cstride: number,
Expand All @@ -25,12 +26,12 @@ export const remap = (

export const collateWith = (
fn: (
buf: Vec,
buf: NumericArray,
src: Iterable<Readonly<StridedVec>>,
start: number,
cstride: number,
estride: number
) => Vec,
) => NumericArray,
pts: StridedVec[],
opts: Partial<CollateOpts>,
stride: number
Expand Down

0 comments on commit 9cf5e5d

Please sign in to comment.