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.

14 lines (13 loc) 533 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isInfinite2D = void 0; /** * Checks if a vector has infinite components. * @param {ArrayVector2D} xy - Vector as `[x, y]` * @returns {ArrayVector2D} `true` if the vector has infinite components, `false` otherwise */ const isInfinite2D = (xy) => xy[0] === Number.POSITIVE_INFINITY || xy[0] === Number.NEGATIVE_INFINITY || xy[1] === Number.POSITIVE_INFINITY || xy[1] === Number.NEGATIVE_INFINITY; exports.isInfinite2D = isInfinite2D;