Number Functions
• | inc |
• | dec |
• | prod |
• | div |
• | mod |
inc(<number>, <number>)
inc returns the sum of two numbers. inc may appear when defining datasource fields or in validations.
Example:
inc(2, 3) # 5
dec(<number>, <number>)
dec subtracts the second argument from the first. dec may appear when defining datasource fields or in validations.
Example:
dec(10, 2) # 8
prod(<number>, <number>)
prod returns the product of two numbers. prod may appear when defining datasource fields or in validations.
Example:
prod(2, 4) # 8
div(<number>, <number>)
div divides the first argument by the second. div may appear when defining datasource fields or in validations.
Example:
div(10, 2) # 5
mod(<number>, <number>)
mod takes a modulus of the first number by the second. mod may appear when defining datasource fields or in validations.
Example:
mod(10, 3) # 1