UNPKG

@fimbul-works/vec

Version:

A comprehensive TypeScript vector math library providing 2D, 3D, and 4D vector operations with a focus on performance and type safety.

11 lines (10 loc) 384 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.immutable4D = void 0; /** * Create an immutable 4D vector. * @param {ArrayVector4D} xyzw - Vector as `[x, y, z, w]` * @returns {Readonly<ArrayVector4D>} The immutable vector */ const immutable4D = (xyzw) => Object.freeze([xyzw[0], xyzw[1], xyzw[2], xyzw[3]]); exports.immutable4D = immutable4D;