operator + method

Point operator +(
  1. Point other
)

Adds two points.

Implementation

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