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.

18 lines (17 loc) 720 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isInfinite4D = void 0; /** * Checks if a 4D vector has infinite components. * @param {ArrayVector4D} xyzw - Vector as `[x, y, z, w]` * @returns {boolean} `true` if vector has infinite components, `false` otherwise */ const isInfinite4D = (xyzw) => xyzw[0] === Number.POSITIVE_INFINITY || xyzw[0] === Number.NEGATIVE_INFINITY || xyzw[1] === Number.POSITIVE_INFINITY || xyzw[1] === Number.NEGATIVE_INFINITY || xyzw[2] === Number.POSITIVE_INFINITY || xyzw[2] === Number.NEGATIVE_INFINITY || xyzw[3] === Number.POSITIVE_INFINITY || xyzw[3] === Number.NEGATIVE_INFINITY; exports.isInfinite4D = isInfinite4D;