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) 195 B
/** * Negates a 3D vector. * @param {ArrayVector3D} xyz - Vector as `[x, y, z]` * @returns {ArrayVector3D} The negated vector */ export const negate3D = (xyz) => [-xyz[0], -xyz[1], -xyz[2]];