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.

7 lines (6 loc) 293 B
/** * Checks if a 3D vector has NaN components. * @param {ArrayVector3D} xyz - Vector as `[x, y, z]` * @returns {boolean} `true` if the vector has `NaN` components, `false` otherwise. */ export const isNaN3D = (xyz) => Number.isNaN(xyz[0]) || Number.isNaN(xyz[1]) || Number.isNaN(xyz[2]);