floor method

BigInt floor()

Returns the biggest integer that is less or equal to this Rat.

Implementation

BigInt floor() {
  return isInteger
      ? truncate()
      : n.isNegative
          ? n ~/ d - BigInt.one
          : n ~/ d;
}