Skip to main content

core.preciseround

Home > @medplum/core > preciseRound

preciseRound() function

Returns the input number rounded to the specified number of digits.

Signature:

export declare function preciseRound(a: number, precision: number): number;

Parameters

ParameterTypeDescription
anumberThe input number.
precisionnumberThe precision in number of digits.

Returns:

number

The number rounded to the specified number of digits.