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) 259 B
/** * Checks if a vector has NaN components. * @param {ArrayVector2D} xy - Vector as `[x, y]` * @returns {boolean} `true` if the vector has `NaN` components, `false` otherwise. */ export const isNaN2D = (xy) => Number.isNaN(xy[0]) || Number.isNaN(xy[1]);