Skip to content

Function: roundWithPrecision() ​

ts
function roundWithPrecision(value: number, precision?: number): number;

Round a number to a decimal precision.

Parameters ​

ParameterTypeDescription
valuenumberNumber to round.
precision?numberNumber of decimal places.

Returns ​

number

Rounded number.