Function maxBig

  • Returns the maximum of two Big numbers.

    Parameters

    • a: Big

      The first Big number.

    • b: Big

      The second Big number.

    • Optional mutable: boolean = false

      Whether to return same Big instance. Defaults to false.

    Returns Big

    • The maximum of the two Big numbers. If the two Big numbers are equal, the first Big number is returned.

    Example

    maxBig(new Big(1), new Big(2)); // new Big instance with value 2 (second Big number)
    maxBig(new Big(2), new Big(1)); // new Big instance with value 2 (first Big number)
    maxBig(new Big(1), new Big(1)); // new Big instance with value 1 (first Big number)
    maxBig(new Big(1), new Big(1), true); // first Big number with value 1 and same instance

Generated using TypeDoc