operator + method

Velocity operator + (Velocity other)

Return the sum of two velocities.

Implementation

Velocity operator +(Velocity other) {
  return Velocity(
      pixelsPerSecond: pixelsPerSecond + other.pixelsPerSecond);
}