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) 392 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isZero4D = void 0; /** * Checks if a 4D vector is zero. * @param {ArrayVector4D} xyzw - Vector as `[x, y, z, w]` * @returns {boolean} `true` if vector is zero, `false` otherwise */ const isZero4D = (xyzw) => xyzw[0] === 0 && xyzw[1] === 0 && xyzw[2] === 0 && xyzw[3] === 0; exports.isZero4D = isZero4D;