Math
13 posts tagged with "Math"
add
The add action Adds a number to an existing value. It belongs to the math category within the data area.
Action Syntax
add 123
add $variable
Valid sizes
Examples
// Basic Usage
add 22
// Using Variables
// Display dynamic content from variables
add $number
average
The average action Calculates the average (mean) of a set of numbers in an array. It belongs to the math category within the undefined area.
Action Syntax
average $variable
Return Value
This function returns a
$result = average
Tags
round=2
Examples
// Basic Usage
average $array
calculate
The calculate action performs a calculation. It belongs to the math category within the data area.
Action Syntax
calculate EXPR
Return Value
This function returns a
$result = calculate
Valid sizes
Examples
// Basic Usage
$number = calculate (expr)
decrement
The decrement action decrmeents a number variable. It belongs to the math category within the data area.
Action Syntax
decrement $variable
Valid sizes
Examples
// Basic Usage
decrement $varname
divide
The divide action divide. It belongs to the math category within the data area.
Action Syntax
divide $variable by $variable
divide $variable by 123
Return Value
This function returns a
increment
The increment action increment - hidden for $var++. It belongs to the math category within the data area.
Action Syntax
increment $variable
Return Value
This function returns a
$result = increment
Examples
// Basic Usage
$number = increment $numv
max
The max action Finds the maximum value from a set of numbers in an array. It belongs to the math category within the data area.
Action Syntax
max $variable
Return Value
This function returns a
$result = max
Examples
// Basic Usage
max $array
modulo
The modulo action calculate the modulo (remainder) of a division. It belongs to the math category within the data area.
Action Syntax
modulo $variable by $variable
modulo $variable by 123
Return Value
This function returns a
multiply
The multiply action multiply value. It belongs to the math category within the data area.
Action Syntax
multiply $variable by $variable
multiply $variable by 123
Return Value
This function returns a
round
The round action rounds a number to a specified number of decimals. It belongs to the math category within the data area.
Action Syntax
round $variable
Return Value
This function returns a
$result = round
Valid sizes
Tags
digits
number of decimals to round to
Examples
// Basic Usage
$number = round $var
round-down
The round-down action rounds a number down to nearest integer. It belongs to the math category within the data area.
Action Syntax
round-down $variable
round-down 123
Return Value
This function returns a
$result = round-down
Valid sizes
Examples
// Basic Usage
$number = round-down $number
round-up
The round-up action rounds a number up to nearest integer. It belongs to the math category within the data area.
Action Syntax
round-up $variable
round-up 123
Return Value
This function returns a
$result = round-up
Valid sizes
Examples
// Basic Usage
$number = round-up $number
subtract
The subtract action subtracts a number from another number. It belongs to the math category within the data area.
Action Syntax
subtract subtract
subtract 123 from $variable
subtract $variable from $variable
Return Value
This function returns a