@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.
11 lines (10 loc) • 305 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.negate2D = void 0;
/**
* Negates a 2D vector.
* @param {ArrayVector2D} xy - Vector as `[x, y]`
* @returns {ArrayVector2D} The negated vector
*/
const negate2D = (xy) => [-xy[0], -xy[1]];
exports.negate2D = negate2D;