XFA Specification
Chapter 23, FormCalc Specification
Arithmetic Built-in Functions
840
Round()
This function returns a number rounded to a given number of decimal places.
Syntax
Round(n1 [, n2])
Parameters
n1
is the number to be evaluated.
n2
is the number of decimal places.
If n2 is omitted, 0 is used as the default.
If n2 is greater than 12, 12 is used as the maximal precision.
Returns
The rounded value or null if any of its parameters are null.
Examples
Calling Round() as follows …
Round(33.2345, 3)
Round(20/3, 2)
Round(-1.3)
Round(Price, 2)
Yields
33.235
6.67
-1
2.33 if the value of the object Price is 2.3333