UNPKG

@thi.ng/vectors

Version:

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

20 lines (19 loc) 433 B
import { roundTo as _round } from "@thi.ng/math/prec"; import { defHofOp } from "./compile/emit.js"; import { ARGS_VV, FN2, FN_N } from "./compile/templates.js"; const [round, round2, round3, round4] = defHofOp( _round, FN2("op"), ARGS_VV ); const [roundN, roundN2, roundN3, roundN4] = defHofOp(_round, FN_N("op"), "o,a,n=1", "o,a"); export { round, round2, round3, round4, roundN, roundN2, roundN3, roundN4 };