rounded method
Rounds to an explicit scale; the default rejects lost precision.
Implementation
Decimal rounded(
int scale, {
DecimalRounding rounding = DecimalRounding.exact,
}) {
validateScale(scale);
if (scale >= this.scale) return this;
return _quotient(coefficient, _power(this.scale - scale), scale, rounding);
}