operator - method

PolarCoord operator -(
  1. PolarCoord other
)

Subtracts other from this PolarCoord.

PolarCoord subtraction is equivalent to 2D vector subtraction.

Implementation

PolarCoord operator -(PolarCoord other) {
  // Due to the complexity of the "+" operation, we implement subtraction as
  // the addition of the inverse of "other".
  return this + (-other);
}