@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.
16 lines (15 loc) • 622 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isInfinite3D = void 0;
/**
* Checks if a vector has infinite components.
* @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
* @returns {boolean} `true` if the vector has infinite components, `false` otherwise
*/
const isInfinite3D = (xyz) => xyz[0] === Number.POSITIVE_INFINITY ||
xyz[0] === Number.NEGATIVE_INFINITY ||
xyz[1] === Number.POSITIVE_INFINITY ||
xyz[1] === Number.NEGATIVE_INFINITY ||
xyz[2] === Number.POSITIVE_INFINITY ||
xyz[2] === Number.NEGATIVE_INFINITY;
exports.isInfinite3D = isInfinite3D;