Math Commands (Template Language)
Command Name | Result Type | Description |
---|---|---|
Ceiling(number:Number) | Number |
Rounds a number up to the nearest whole number. Parameter: The number to round up. Example: |
Dec(number:Number) | Number |
Decrements the given number by one. Parameter: The number to decrement. Example: |
Div(...number:Number) | Number |
Divides the first number by each subsequent number in the parameter list. Parameters: A sequence of numbers to be divided, starting with the dividend followed by one or more divisors. Example: |
Floor(number:Number) | Number |
Rounds a number down to the nearest whole number. Parameter: The number to round down. Example: |
Inc(number:Number) | Number |
Increments the given number by one. Parameter: The number to increment. Example: |
IsNumber(object:Object) | Boolean |
Checks if the given object is a number. Parameter: The object to check. Example: |
Log(number:Number, newBase:Number) | Number |
Calculates the logarithm of a number with respect to a base. Parameters: The number and the base for the logarithm calculation. Example: |
Max(...number:Number) | Number |
Returns the maximum value among the given numbers. Parameters: A comma-separated list of numbers to compare. Example: |
Min(...number:Number) | Number |
Returns the minimum value among the given numbers. Parameters: A comma-separated list of numbers to compare. Example: |
Mod(number:Number, divisor:Number) | Number |
Calculates the remainder of the division of the given number by the divisor. Parameters: The dividend and the divisor. Example: |
Mul(...number:Number) | Number |
Multiplies the given numbers together. Parameters: A sequence of numbers to multiply. Example: |
Pow(x:Number, y:Number) | Number |
Raises a number to the power of another number. Parameters: The base number Example: |
Round(number:Number, digits:Number) | Number |
Rounds a number to a specified number of decimal places. Parameters: The number to round and the number of decimal places to round to. Example: |
Sqrt(number:Number) | Number |
Calculates the square root of a number. Parameter: The number to find the square root of. Example: |
Subt(...number:Number) | Number |
Subtracts each subsequent number from the first number in the parameter list. Parameters: A sequence of numbers to subtract, starting with the minuend followed by one or more subtrahends. Example: |
Sum(...number:Number) | Number |
Adds together all the given numbers. Parameters: A sequence of numbers to add. Example: |
New Comment