Equinox Online Help - Language Reference - A to Z

Home

Round

Applies to
SyntaxRound(NumberItem, BaseExpression [,RoundupExpression])
Action[Function] Rounds a number up or down.
ScopeUsable anywhere.
Notes

This function rounds NumberItem up or down, to the nearest multiple of BaseExpression. RoundupExpression, which defaults to true, controls whether the number is rounded to the nearest acceptable value; if false is supplied, the number is truncated to the smaller value.

CategoryMaths
See Also Abs, Acos, Asin, Atan, Cos, Deg, Int, Log, Max, Min, MinMax, Rad, Rnd, RndStart, Sign, Sin, Sqrt, Tan
Example

In the following examples, the adjacent comments show what is printed (in the Print window) by each statement.

Print Round (45, 10) | 50
Print Round (3.14159, 0.001) | 3.142
Print Round (423, 5) | 425
Print Round (12345, 1000) | 12000
Print Round (0.2513, 0.1) | 0.3
Print Round (0.2513, 0.1, 0) | 0.2