operator + method

Coordinate operator +(
  1. Coordinate other
)

Returns the (vector-) sum of this and other.

Implementation

Coordinate operator +(Coordinate other) {
  return Coordinate(x + other.x, y + other.y);
}