Skip to main content

Function: modulo()

modulo(this, left, right): NumberT

Return the remainder from the division of the input value by the argument value.

Parameters

this: FilterContext

An object containing a reference to the active render context and any keyword/named arguments.

left: unknown

Any value. If it can't be converted to a number, zero will be used instead.

right: unknown

Any value. If it can't be converted to a number an exception will be raised.

Returns

NumberT

the remainder from the division of the input value by the argument value.

Throws

FilterArgumentError Thrown if the argument is zero or can't be converted to a number.

Defined in

src/builtin/filters/math.ts:163