UNPKG

@thi.ng/vectors

Version:

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

14 lines (13 loc) 249 B
import { defOpV } from "./defopv.js"; const { sqrt } = Math; const [a, b, c, d] = defOpV((a2) => 1 / sqrt(a2)); const invSqrt = a; const invSqrt2 = b; const invSqrt3 = c; const invSqrt4 = d; export { invSqrt, invSqrt2, invSqrt3, invSqrt4 };