The current options for rounding are:
- Round Normal - (Do not be deceived, this is not the rounding you learned in school!) Round normal uses two numbers to determine whether to round up or down. The first number is the number following the significant digit, and the second number is the value's very last digit (Note: this very last digit is never revealed to the user as it is hidden in the system). Given the value 7.12345000000000009 and a desire to round to two decimal places the significant digit is in the hundredth's place of the decimal ("2"). The number "3" is the number following the significant digit and the number "9" is the value's very last digit. When the number following the significant digit is 6,7,8, or 9 the significant digit will increase by one, and if the number following the significant digit is 1,2,3, or 4 the significant digit will remain the same. If the number after the last significant digit is 5 then value's very last digit is looked at, and if that very last digit is even, the significant digit will increase by one, else it will reamain as it was.
For example, the length property of an object may be revealed to the user as 6.24500000, but internally the value may be 6.245000001 in which case if the number is to be rounded to two decimal places, it would round down to 6.24 because the very last digit of the number is the odd number "1".
This is not the result that most people would expect, nor is it predictable since it is impossible for the user to know what the very last digit of a number is. - Round Up - Rounds the significant digit up regardless of anything I.E. 123.221 rounds up to 123.23.
This is rarely what people want.
The method of rounding that should be added:
- Round half up - (This is the rounding you learned in school!) Round half up uses one number to determine whether to round up or down. The number is the number following the significant digit. Given the value 6.245000001 and a desire to round to two decimal places the significant digit is in the hundredth's place of the decimal ("4"). The number "5" is the number following the significant digit. When the number following the significant digit is 5,6,7,8, or 9 the significant digit will increase by one, and if the number following the significant digit is 1,2,3, or 4 the significant digit will remain the same. In this case the number will round to 6.25.