Fix FixedNumber comparison bug (#4112).

This commit is contained in:
Richard Moore 2023-06-01 17:48:56 -04:00
parent bbcfb5f6b8
commit d8e9586044

View File

@ -430,7 +430,7 @@ export class FixedNumber {
* Returns a comparison result between %%this%% and %%other%%.
*
* This is suitable for use in sorting, where ``-1`` implies %%this%%
* is smaller, ``1`` implies %%other%% is larger and ``0`` implies
* is smaller, ``1`` implies %%this%% is larger and ``0`` implies
* both are equal.
*/
cmp(other: FixedNumber): number {
@ -446,7 +446,7 @@ export class FixedNumber {
// Comnpare
if (a < b) { return -1; }
if (a > b) { return -1; }
if (a > b) { return 1; }
return 0;
}