round

From RPTools Wiki
Revision as of 23:47, 24 February 2010 by Coveredinfish (talk | contribs) (New page: {{MacroFunction |name=round |description=Returns the rounded value of a number to specified precision (number of digits after the decimal point). precision can be zero (default)...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

round() Function

Returns the rounded value of a number to specified precision (number of digits after the decimal point). precision can be zero (default).

Usage

[h: result = round(number, precision)]

Examples

[r: round(1.45)]

Returns 1

[r: floor(1.45, 1)]

Returns 1.5

[r: floor(1.44,1)]
Returns 1.4