Skip to main content

core.preciseequals

Home > @medplum/core > preciseEquals

preciseEquals() function

Returns true if the two numbers are equal to the given precision.

Signature:

export declare function preciseEquals(a: number, b: number, precision?: number): boolean;

Parameters

ParameterTypeDescription
anumberThe first number.
bnumberThe second number.
precisionnumber(Optional) Optional precision in number of digits.

Returns:

boolean

True if the two numbers are equal to the given precision.