operator + method

  1. @override
Size operator +(
  1. Point<num> other
)
override

Add other to this, as if both points were vectors.

Returns the resulting "vector" as a Point.

Example:

var point = const Point(10, 100) + const Point(10, 10); // Point(20, 110)
point = const Point(-10, -20) + const Point(10, 100); // Point(0, 80)

Implementation

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