isInteger property

bool get isInteger

Whether this Rat is an integer.

Implementation

bool get isInteger {
  return d == BigInt.one || n.remainder(d) == BigInt.zero;
}