Mod method (number)

Returns the remainder resulting from dividing this number with a specified number.

Syntax

number1.Mod(number2)

Returns the remainder resulting from dividing number1 (dividend) by number2 (divisor) as a number value.

Example

{% Var number = 16.8 %}

Answer: {{ number.Mod(4.1) }}

The above example would output: Answer: 0.4

Remarks

If number2 is zero or the remainder resulting from dividing number1 by number2 falls outside the range of permitted values for a number it will cause a template error.