Cicode Programming Reference > Cicode Function Categories > Math and Trigonometry Functions Introduction > Round

Round

Rounds a number to a specified number of decimal places.

Syntax

Round(Number, Places)

Number:

The floating-point number to round.

Places:

The number of decimal places.

Return Value

The number rounded to Places decimal places.

Example

Variable=Round(0.7843,2);
! Sets Variable to 0.78 (result is rounded to 2 decimal places).
Variable=Round(123.45,-1);
! Sets Variable to 120.0 (rounded to -1 decimal place).

See Also

Math/Trigonometry Functions