fromInt static method

Rat fromInt(
  1. int n, [
  2. int d = 1
])

Creates a new Rat from two integers (numerator and denominator).

Implementation

static Rat fromInt(int n, [int d = 1]) {
  return Rat(BigInt.from(n), BigInt.from(d));
}