DecimalControl.rounding

Gets or sets the rounding mode used when the result of an operation exceeds the _decimal precision. See RoundingMode for details.

DecimalControl.rounding = RoundingMode.tiesToEven;
decimal32 d1 = 123456789;
assert(d1 == 123456800);

DecimalControl.rounding = RoundingMode.towardNegative;
decimal32 d2 = 123456789;
assert(d2 == 123456700);
struct DecimalControl
static
@IEEECompliant("defaultModes", 46)
@IEEECompliant("getDecimalRoundingDirection", 46)
@IEEECompliant("restoreModes", 46)
@IEEECompliant("saveModes", 46)
@IEEECompliant("setDecimalRoundingDirection", 46)
RoundingMode rounding;

Meta