UNPKG

@thi.ng/vectors

Version:

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

15 lines (14 loc) 387 B
import { defOp } from "./compile/emit.js"; import { ARGS_V } from "./compile/templates.js"; const [bitNotI, bitNotI2, bitNotI3, bitNotI4] = defOp(([o, a]) => `${o}=(~${a})|0;`, ARGS_V); const [bitNotU, bitNotU2, bitNotU3, bitNotU4] = defOp(([o, a]) => `${o}=(~${a})>>>0;`, ARGS_V); export { bitNotI, bitNotI2, bitNotI3, bitNotI4, bitNotU, bitNotU2, bitNotU3, bitNotU4 };