The NumberBaseRoundType class defines the constant values for formatter properties that specify a type of rounding. For example, you can set the NumberFormatter.rounding property using these constants.

See also:

Variables

@:value(cast "down")@:impl@:enuminlineread onlyDOWN:NumberBaseRoundType = "down"

Rounds a number down to an integer that is both closest to, and less than or equal to, the input number.

@:value(cast "nearest")@:impl@:enuminlineread onlyNEAREST:NumberBaseRoundType = "nearest"

Rounds a number up or down to the nearest integer.

@:value(cast "none")@:impl@:enuminlineread onlyNONE:NumberBaseRoundType = "none"

Perform no rounding.

@:value(cast "up")@:impl@:enuminlineread onlyUP:NumberBaseRoundType = "up"

Rounds a number up to an integer value that is both closest to, and greater than or equal to, the input number.