Rounding Functions
The following functions are useful for performing various rounding calculations.
Note: Although you can use these rounding functions as you would any other predefined function, they are actually implemented as user-defined functions in the functions file provided with the Flame installation. See Defining Your Own Functions.
round
Returns a number rounded to the nearest integer.
Syntax: | round(Number) |
Arguments: |
|
Examples: |
|
ceil
Rounds a number up to the next integer value regardless of its value.
Syntax: | ceil(Number) |
Arguments: |
|
Examples: |
|
floor
Rounds a number down to the nearest integer regardless of its value.
Syntax: | floor(Number) |
Arguments: |
|
Examples: |
|
trunc
Returns the integer value of a number by truncating its fractional part.