AlyaNum
    Preparing search index...

    Interface AlyaNumConstructor

    Static version of AlyaNum. This is only separated because roblox-ts requires it. You can simply ignore the naming and treat this interface as AlyaNum.

    interface AlyaNumConstructor {
        new AlyaNumConstructor(val: Number): AlyaNum;
        abs: (number: Number) => AlyaNum;
        ceil: (number: Number) => AlyaNum;
        changeDecimalPoints: (decimalPoints: number) => void;
        changeDefaultAbbreviation: (mode: "suffix" | "scientific") => void;
        changeSuffixes: (suffixes: Suffixes) => void;
        floor: (number: Number) => AlyaNum;
        fromOmega: (onum: [number, number[]]) => AlyaNum;
        fromOnoe: (onoeNum: { exponent: number; mantissa: number }) => AlyaNum;
        fromScientific: (str: string) => AlyaNum;
        fromSingle: (single: number) => AlyaNum;
        fromString: (str: string) => AlyaNum;
        GOOGOL: AlyaNum;
        GOOGOLPLEX: AlyaNum;
        GOOGOLPLEXPLEX: AlyaNum;
        GRAHAM1: AlyaNum;
        log: (number: Number, base: number) => AlyaNum | undefined;
        log10: (number: Number) => AlyaNum | undefined;
        max: (number1: AlyaNum, number2: Number) => AlyaNum;
        min: (number1: AlyaNum, number2: Number) => AlyaNum;
        minmax: (number1: AlyaNum, number2: Number) => LuaTuple<[AlyaNum, AlyaNum]>;
        revert: (number: BaseAlyaNum) => number;
        round: (number: Number) => AlyaNum;
        toScientific: (number: Number) => string;
        toSingle: (number: Number) => number;
        toString: (number: Number) => string;
        toSuffix: (number: Number) => string;
        TRITET: AlyaNum;
        TRITRI: AlyaNum;
        unary: (number: Number) => AlyaNum;
        toEChain(number: Number): string;
        toEnt(number: Number): string;
        toHyperE(number: Number): string;
    }
    Index

    Constructors

    • Create a new AlyaNum object from a primitive number.

      Parameters

      • val: Number

        Primitive number or a table containing mantissa and exponent entries

      Returns AlyaNum

    Properties

    abs: (number: Number) => AlyaNum

    Get the absolute value of the AlyaNum.

    Type Declaration

    ceil: (number: Number) => AlyaNum

    Rounds up the AlyaNum to the nearest integer. This operation is unsafe for numbers beyond 2^1024.

    Type Declaration

    changeDecimalPoints: (decimalPoints: number) => void

    Change the number of decimal points when formatting AlyaNum into a string.

    Type Declaration

      • (decimalPoints: number): void
      • Parameters

        • decimalPoints: number

          Decimal points to display in strings

        Returns void

    changeDefaultAbbreviation: (mode: "suffix" | "scientific") => void

    Change the default abbreviation mode used in toString.

    Type Declaration

      • (mode: "suffix" | "scientific"): void
      • Parameters

        • mode: "suffix" | "scientific"

          Abbreviation method to use

        Returns void

    changeSuffixes: (suffixes: Suffixes) => void

    Change the suffixes to be shown when using the method toSuffix.

    Type Declaration

      • (suffixes: Suffixes): void
      • Parameters

        Returns void

    changeSuffixes({
    beginning: ["K", "M", "B"],
    first: ["U", "D", "T", "Qd", "Qn", "Sx", "Sp", "Oc", "No"],
    second: ["De", "Vt", "Tg", "Qdg", "Qng", "Sxg", "Spg", "Ocg", "Nog"],
    third: ["Ce", "Dce", "Tce", "Qdce", "Qnce", "Sxce", "Spce", "Occe", "Noce"],
    mult: ["Mi", "Mc", "Na", "Pi", "Fm", "At", "Zp", "Yc", "Xo", "Ve", "Me"]
    })
    floor: (number: Number) => AlyaNum

    Rounds down the AlyaNum to the nearest integer. This operation is unsafe for numbers beyond 2^1024.

    Type Declaration

    fromOmega: (onum: [number, number[]]) => AlyaNum

    Create a new AlyaNum object from an OmegaNum. This function is mainly reserved for migration of number libraries. (OnoeNum -> OmegaNum)

    Type Declaration

      • (onum: [number, number[]]): AlyaNum
      • Parameters

        • onum: [number, number[]]

          Object to migrate from. Will automatically detect when the object is already migrated

        Returns AlyaNum

        Resulting AlyaNum object

    fromOnoe: (onoeNum: { exponent: number; mantissa: number }) => AlyaNum

    Create a new AlyaNum object from a BaseOnoeNum. This function is mainly reserved for migration of number libraries. (OnoeNum -> AlyaNum)

    Type Declaration

      • (onoeNum: { exponent: number; mantissa: number }): AlyaNum
      • Parameters

        • onoeNum: { exponent: number; mantissa: number }

          Object to migrate from. Will automatically detect when the object is already migrated

        Returns AlyaNum

        Resulting AlyaNum object

    fromScientific: (str: string) => AlyaNum

    Converts strings formatted as raw scientific notation into an AlyaNum. This function does NOT accept suffixed scientific notations that are produced from toScientific and should only be used as a utility function to conveniently get numbers larger than 10^308.

    Type Declaration

      • (str: string): AlyaNum
      • Parameters

        • str: string

          Scientific notated string to convert into AlyaNum

        Returns AlyaNum

        Resulting AlyaNum

    const number1 = AlyaNum.fromScientific("2.4e5200") // 2.4e5.2K
    const number2 = new AlyaNum(2.4).mul(new AlyaNum(10).pow(5200)) // 2.4e5.2K
    fromSingle: (single: number) => AlyaNum

    Converts the single primitive number back into an AlyaNum object. This AlyaNum object is usually much more imprecise than it previous was before conversion into a single primitive number. Use this method to display numbers stored in leaderboard datastores.

    Type Declaration

      • (single: number): AlyaNum
      • Parameters

        • single: number

          Single primitive number

        Returns AlyaNum

        Resulting AlyaNum object

    fromString: (str: string) => AlyaNum

    Converts a formatted string into an AlyaNum. Does not handle tier 2 suffixes i.e. suffixes above Noce.

    Type Declaration

      • (str: string): AlyaNum
      • Parameters

        • str: string

          String to parse

        Returns AlyaNum

        Resulting AlyaNum

    fromString("2852852858") // Result: AlyaNum 2.85B
    fromString("5e511") // Result: AlyaNum 50NoSxgCe
    fromString("eeee5") // Result: AlyaNum eee100000
    fromString("26UDe") // Result: AlyaNum 26UDe
    GOOGOL: AlyaNum

    Constant for 10^100.

    GOOGOLPLEX: AlyaNum

    Cnstant for 10^(10^100).

    GOOGOLPLEXPLEX: AlyaNum

    Constant for 10^(10^(10^100)).

    GRAHAM1: AlyaNum

    Constant for 3^^^^3. (^^^^ = hexation)

    log: (number: Number, base: number) => AlyaNum | undefined

    Get the logarithm of the AlyaNum object with the specified primitive number base.

    Type Declaration

      • (number: Number, base: number): AlyaNum | undefined
      • Parameters

        • number: Number

          AlyaNum object

        • base: number

          Base of the logarithm as a primitive number

        Returns AlyaNum | undefined

        Resulting AlyaNum object. Note that if the specified number is negative, this will return nil.

    log10: (number: Number) => AlyaNum | undefined

    Get the logarithm of the AlyaNum object with a base of 10.

    Type Declaration

    max: (number1: AlyaNum, number2: Number) => AlyaNum

    Returns the maximum value of two AlyaNum objects.

    Type Declaration

    min: (number1: AlyaNum, number2: Number) => AlyaNum

    Returns the minimum value of two AlyaNum objects.

    Type Declaration

    minmax: (number1: AlyaNum, number2: Number) => LuaTuple<[AlyaNum, AlyaNum]>

    Returns the minimum and maximum value of two AlyaNum objects.

    Type Declaration

    revert: (number: BaseAlyaNum) => number

    Reverts the AlyaNum back to a primitive number. For numbers beyond 2^1024, this will return math.huge.

    Type Declaration

      • (number: BaseAlyaNum): number
      • Parameters

        Returns number

        Reverted primitive number

    round: (number: Number) => AlyaNum

    Rounds the AlyaNum to the nearest integer. This operation is unsafe for numbers beyond 2^1024.

    Type Declaration

    toScientific: (number: Number) => string

    Converts the AlyaNum object into a string in scientific notation format.

    Type Declaration

      • (number: Number): string
      • Parameters

        Returns string

        Resulting string

    toSingle: (number: Number) => number

    Converts the AlyaNum object into a single primitive number that represents the magnitude of the number. This method should only be used for leaderboards and other things that do not require the specific number itself as the resulting single numbers are highly imprecise.

    Type Declaration

      • (number: Number): number
      • Parameters

        Returns number

        Resulting single number

    toString: (number: Number) => string

    Converts the AlyaNum object into a displayable string.

    Type Declaration

      • (number: Number): string
      • Parameters

        Returns string

        Resulting string

    toSuffix: (number: Number) => string

    Converts the AlyaNum into a string with a number and suffix. Use the changeSuffixes method to edit the suffixes. If a suffix for the specified AlyaNum is not found, scientific notation is used.

    Type Declaration

      • (number: Number): string
      • Parameters

        Returns string

        Resulting string

    TRITET: AlyaNum

    Constant for 4^^^^4. (^^^^ = hexation)

    TRITRI: AlyaNum

    Constant for 3^^^3. (^^^ = pentation)

    unary: (number: Number) => AlyaNum

    Flips the sign of the AlyaNum object. Equivalent to multiplying by -1.

    Type Declaration

    Methods

    • Converts the AlyaNum into a string in an E chain. An E chain is exactly what it says. 1e(1e1M) is formatted as ee1M. E chains place all Es at the start, and have a maximum chain of 10 Es.

      Parameters

      Returns string

      Resulting string