Method: Round decimal value
Function name: rounddecimal
Parameter list: (DECIMAL input, integer scale)
Return type: ROUNDED DECIMAL
What the method does: Rounds the input decimal value according to the scale specified by the second argument. The result is a rounded decimal value.
The scale must be an integer greater than or equal to 0. If scale is 0, then the value is effectively rounded to the next higher integer value. At run-time, if the scale is a negative, then the method assumes a scale of 0.
Important: The method of rounding used is ROUND_HALF_UP.
Rounding mode is to round towards “nearest neighbor” unless both neighbors are equidistant, in which case, round up. This rounds up if the discarded fraction is >= .5; otherwise, rounds down.