operator / method
Money / int/double(按当前精度模式取整)
Implementation
Money operator /(num divisor) {
if (divisor == 0) throw UnsupportedError("除数不能为0");
final result = _cents / divisor;
final resultCents = switch (precisionMode) {
PrecisionMode.round => result.round(),
PrecisionMode.floor => result.floor(),
PrecisionMode.ceil => result.ceil(),
};
_checkOverflow(resultCents);
return Money._cached(resultCents.toInt(), precisionMode);
}