/vector2/add
stdAdds two vectors.
Type signature
([x1, y1]: [number, number], [x2, y2]: [number, number]) => [number, number]
Examples
add([3, 5], [-1, 8]);
// ⇒ [2, 13]
Try in REPL
Questions
- How to add two vectors?
([x1, y1]: [number, number], [x2, y2]: [number, number]) => [number, number]
add([3, 5], [-1, 8]);
// ⇒ [2, 13]
Try in REPL