Skip to content

textmode.js / Textmodifier / round

Method: round()

ts
round(value, decimals?): number;

Round to the closest integer or decimal place.

Parameters

ParameterTypeDescription
valuenumberValue to round.
decimals?numberNumber of decimal places. Defaults to 0.

Returns

number

Rounded value.

Example