operator + method

ColorTriplet operator +(
  1. ColorTriplet other
)

Adds two ColorTriplet objects.

Implementation

ColorTriplet operator +(ColorTriplet other) =>
    ColorTriplet(r + other.r, g + other.g, b + other.b);