operator + method

OffsetPair operator +(
  1. OffsetPair other
)

Adds the other.global to global and other.local to local.

Implementation

OffsetPair operator+(OffsetPair other) {
  return OffsetPair(
    local: local + other.local,
    global: global + other.global,
  );
}