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
| Parameter | Type | Description |
|---|---|---|
| a | number | The first number. |
| b | number | The second number. |
| precision | number | (Optional) Optional precision in number of digits. |
Returns:
boolean
True if the two numbers are equal to the given precision.