Function compareBig

  • Compares two Big numbers and returns a CompareResult indicating the relation between them.

    Parameters

    • a: Big

      The first Big number to compare.

    • b: Big

      The second Big number to compare.

    Returns CompareResult

    • 1 if a > b, -1 if a < b, or 0 if a == b.

    Example

    compareBig(new Big(1), new Big(2)); // -1
    compareBig(new Big(2), new Big(1)); // 1
    compareBig(new Big(1), new Big(1)); // 0

Generated using TypeDoc