operator ~ method

BigRational operator ~()

Rounds this BigRational towards zero and returns the result as a BigRational.

Implementation

BigRational operator ~() {
  if (denominator.isNegative) {
    return BigRational._(numerator, -denominator);
  }
  return BigRational._(-numerator, denominator);
}