Skip to main content

Home > @jsplumb/util > fixPrecision

fixPrecision() function#

Trim decimal points from a number. Defaults to 3 decimal points.

Signature:

export declare function fixPrecision(n: number, digits?: number): number;

Parameters#

ParameterTypeDescription
nnumber
digitsnumber

Returns:

number