@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) • 367 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.immutable3D = void 0;
/**
* Create an immutable 3D vector.
* @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
* @returns {Readonly<ArrayVector3D>} The immutable vector
*/
const immutable3D = (xyz) => Object.freeze([xyz[0], xyz[1], xyz[2]]);
exports.immutable3D = immutable3D;