moduloBigInt method

  1. @override
Decimal moduloBigInt(
  1. BigInt n2
)
override

Euclidean modulo for BigInt n2.

Implementation

@override
Decimal moduloBigInt(BigInt n2) {
  var n1 = compactedPrecision;

  if (n1.precision == 0) {
    return Decimal.fromBigInt(toBigInt() % n2);
  } else {
    return n1._moduloDecimal(Decimal.fromBigInt(n2));
  }
}