Rational constructor

const Rational(
  1. int _numerator, [
  2. int _denominator = 1
])

Creates a new Rational from _numerator and _denominator.

Implementation

const Rational(this._numerator, [this._denominator = 1])
    : assert(_denominator != 0, 'The denominator cannot be zero.');