Decimal number handling APIs.
function ceiling(value as decimal, precision as int) as decimal
Rounding mode to round towards positive infinity. If the result is positive, behaves as for roundUp; if negative, behaves as for roundDown.
Since: 1.6.0
function coalesce(value as decimal, defaultValue as decimal) as decimal
Since 1.5.1
function floor(value as decimal, precision as int) as decimal
Rounding mode to round towards negative infinity. If the result is positive, behaves as for roundDown; if negative, behaves as for roundUp.
Since: 1.6.0
function fromString(value as string) as decimal
Converts string values to decimal.
function max(value1 as decimal, value2 as decimal) as decimal
The maximum value between value1 and value2.
Since: 1.5.0
function min(value1 as decimal, value2 as decimal) as decimal
The minimum value between value1 and value2.
Since: 1.5.0
function random(valmin as decimal, valmax as decimal, precision as int) as decimal
Returns a new random decimal between valmin and valmax with the precision specified. If precision is 0, 0 decimals will be used.
Since: 1.7.0
function roundDown(value as decimal, precision as int) as decimal
Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round down.
Since: 1.6.0
function roundUp(value as decimal, precision as int) as decimal
Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round up.
Since: 1.6.0