Tag Archives: format()

Rounding numbers in Flex using the NumberFormatter class

I was looking at the NumberFormatter class this evening and made this little demo that shows the four different types of rounding (nearest, up, down, and none) in action.

The following example shows how you can use the static NumberFormatter class in conjuction with the NumberBaseRoundType constants to round and format numbers based on a certain criteria.

Continue reading Rounding numbers in Flex using the NumberFormatter class