operator > method

bool operator >(
  1. Rat other
)

Whether this Rat is greater than other.

Implementation

bool operator >(Rat other) {
  return n * other.d > other.n * d;
}