operator - method

Offset operator - (Offset other)

Binary subtraction operator.

Returns an offset whose dx value is the left-hand-side operand's dx minus the right-hand-side operand's dx and whose dy value is the left-hand-side operand's dy minus the right-hand-side operand's dy.

See also translate.

Implementation

Offset operator -(Offset other) => new Offset(dx - other.dx, dy - other.dy);