Kodall
Packages

Package: decimal

Decimal number handling APIs.

Decimal number handling APIs.

Methods

ceiling

ONE Workflow
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

coalesce

ONE Workflow
function coalesce(value as decimal, defaultValue as decimal) as decimal

Since 1.5.1

floor

ONE Workflow
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

fromString

ONE Workflow
function fromString(value as string) as decimal

Converts string values to decimal.

max

ONE Workflow
function max(value1 as decimal, value2 as decimal) as decimal

The maximum value between value1 and value2.

Since: 1.5.0

min

ONE Workflow
function min(value1 as decimal, value2 as decimal) as decimal

The minimum value between value1 and value2.

Since: 1.5.0

random

ONE Workflow
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

roundDown

ONE Workflow
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

roundUp

ONE Workflow
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