syntax:functions:mround
This is an old revision of the document!
Table of Contents
MRound(number, grain)
Category: Number function
Description
This function rounds a number to the desired multiple (grain).
Arguments
Argument | Type | Description |
---|---|---|
number | Number | The value, usually fractional, to be rounded. |
grain | Number | The multiple to round number to. |
Return value type: Number
Remarks
MRound rounds a grain value of 5 and less down, and greater than 5, up. See Examples below.
Examples
mround(5.3, 0.5) //Returns 5.5
mround(10.05, 0.1) //Returns 10.0 (.05 rounds down)
mround(10.06, 0.1) //Returns 10.1 (greater than .05 rounds up)
mround(20.78, 1) //Returns 21
mround(57, 15) //Returns 60
See also
syntax/functions/mround.1631027984.txt.gz · Last modified: 2021/09/07 11:19 by craigt