operator * method

Money operator *(
  1. num multiplier
)

Money * int/double(按当前精度模式取整)

Implementation

Money operator *(num multiplier) {
  final result = _cents * multiplier;
  final resultCents = switch (precisionMode) {
    PrecisionMode.round => result.round(),
    PrecisionMode.floor => result.floor(),
    PrecisionMode.ceil => result.ceil(),
  };
  _checkOverflow(resultCents);
  return Money._cached(resultCents.toInt(), precisionMode);
}