Skip to main content

Function: round()

round(this, left, decimalPlaces?): NumberT

Return the input number rounded to the given number of decimal places.

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.

decimalPlaces?: unknown

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

Returns

NumberT

The input number rounded to the given number of decimal places

Defined in

src/builtin/filters/math.ts:208