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) 345 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isZero2D = void 0; /** * Checks if a vector is zero. * @param {ArrayVector2D} xy - Vector as `[x, y]` * @returns {boolean} `true` if the vector is zero, `false` otherwise */ const isZero2D = (xy) => xy[0] === 0 && xy[1] === 0; exports.isZero2D = isZero2D;