syntax:functions:round
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
syntax:functions:round [2021/07/31 21:49] – craigt | syntax:functions:round [2023/02/28 20:13] (current) – [See also] fix MRound page reference -CT craigt | ||
---|---|---|---|
Line 5: | Line 5: | ||
=====Description===== | =====Description===== | ||
This function rounds a number to // | This function rounds a number to // | ||
+ | |||
+ | \\ | ||
+ | |||
+ | =====Alternative syntax===== | ||
+ | The 2nd argument in this function is optional. If omitted, it's assumed to be 0. | ||
+ | Round(number) | ||
\\ | \\ | ||
Line 10: | Line 16: | ||
^Argument^Type^Description^ | ^Argument^Type^Description^ | ||
|number|Number|The value, usually fractional, to be rounded.| | |number|Number|The value, usually fractional, to be rounded.| | ||
- | |dec_places|Number (positive, >=0)|The number of decimal places to round //number// to.| | + | |dec_places|Number (from -9 to 28)|The number of decimal places to round //number// to.| |
\\ | \\ | ||
**Return value type: | **Return value type: | ||
Line 23: | Line 29: | ||
=====Examples===== | =====Examples===== | ||
- | round(5.55, 1) = 5.6 | + | round(5.55, 1) // |
- | round(5.65, 1) = 5.6 | + | |
- | round(101.567, | + | round(5.65, 1) // |
- | round(101.5784, | + | |
- | round(92.523, | + | round(101.567, |
+ | |||
+ | round(101.5784, | ||
+ | |||
+ | round(92.523, | ||
+ | |||
+ | round(12345, | ||
+ | | ||
\\ | \\ | ||
===== See also ===== | ===== See also ===== | ||
* [[syntax: | * [[syntax: | ||
* [[syntax: | * [[syntax: | ||
+ | * [[syntax: | ||
* [[syntax: | * [[syntax: | ||
* [[syntax: | * [[syntax: |
syntax/functions/round.txt · Last modified: 2023/02/28 20:13 by craigt