This documentation is archived and is not being maintained.
round Function
Rounds a real number to the nearest multiple of another real number.
real round(real _arg, real _decimals)
|
Parameter
|
Description
|
|
_arg
|
The original number.
|
|
_decimals
|
The number that the value of the _arg parameter must be rounded to a multiple of.
|
The number that is a multiple of the value specified by the _decimals parameter and is closest to the value specified by the _arg parameter.
To round of a real number to a specified number of decimal places, use the decround function.
-
round(123.45,5.00); //Returns the value 125.00.
-
round(7.45,1.05); //Returns the value 7.35.
-
round(23.9,5.0); //Returns the value 25.00;
-
round(26.1,5.0); //Returns the value 25.00;