Skip to main content

Function: abs()

abs(this, left): NumberT

Return the absolute value of a number. Given a value that can't be cast to an integer or float, 0 will be returned.

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.

Returns

NumberT

  • The absolute value of the input argument.

Defined in

src/builtin/filters/math.ts:16