From d8e9586044e888e424b5ead0f6e01f88140dba8a Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Thu, 1 Jun 2023 17:48:56 -0400 Subject: [PATCH] Fix FixedNumber comparison bug (#4112). --- src.ts/utils/fixednumber.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src.ts/utils/fixednumber.ts b/src.ts/utils/fixednumber.ts index 5f700e31d..543c866e1 100644 --- a/src.ts/utils/fixednumber.ts +++ b/src.ts/utils/fixednumber.ts @@ -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; }