round: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Conversion script moved page Round to round: Converting page titles to lowercase)
m (Conversion script moved page Round to round: Converting page titles to lowercase)
 
(No difference)

Latest revision as of 23:59, 9 February 2023

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(value, precision)]

Parameters

  • value - Input value to round.
  • precision - Number of decimal places to retain. Default is 0.

Examples

[r: round(1.45)]

Returns 1

[r: round(1.45, 1)]

Returns 1.5

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