operator % method

Money operator %(
  1. num divisor
)

Money % int/double(取模运算,结果保留分)

Implementation

Money operator %(num divisor) {
  if (divisor == 0) throw UnsupportedError("除数不能为0");
  final resultCents = (_cents % (divisor * 100)).round().toInt();
  return Money._cached(resultCents, precisionMode);
}