Add vectors together.
Target vector.
The vector to add.
Error - When a computed component is NaN or non-finite.
add({ x: -1, y: -1 }, { x: 1, y: 1 }); // -> { x: 0, y: 0 } Copy
add({ x: -1, y: -1 }, { x: 1, y: 1 }); // -> { x: 0, y: 0 }
Destination object to store the result.
let result = { x: 0, y: 0 };add({ x: -1, y: -1 }, { x: 1, y: 1 }, result); // -> { x: 0, y: 0 } Copy
let result = { x: 0, y: 0 };add({ x: -1, y: -1 }, { x: 1, y: 1 }, result); // -> { x: 0, y: 0 }
Add vectors together.