UNPKG

@thi.ng/vectors

Version:

Optimized 2d/3d/4d and arbitrary length vector operations, support for memory mapping/layouts

19 lines (18 loc) 357 B
import { SYSTEM } from "@thi.ng/random/system"; import { defHofOp } from "./compile/emit.js"; import { NEW_OUT_A } from "./compile/templates.js"; const [random, random2, random3, random4] = defHofOp( SYSTEM, ([a]) => `${a}=rnd.minmax(n,m);`, "a,n=-1,m=1,rnd=op", "a", "a", 0, NEW_OUT_A ); export { random, random2, random3, random4 };