add method

Vector2D add(
  1. Vector2D o
)

Returns a new vector that is the component-wise sum of this and o.

Implementation

Vector2D add(Vector2D o) => .vec2(x + o.x, y + o.y);