interface RotRngInterface {
    clone(): RotRngInterface;
    getItem<T>(array: T[]): null | T;
    getNormal(mean?: number, stddev?: number): number;
    getPercentage(): number;
    getSeed(): number;
    getState(): SerializedRng;
    getUniform(): number;
    getUniformInt(lowerBound: number, upperBound: number): number;
    getWeightedValue(data: {
        [key: string]: number;
        [key: number]: number;
    }): string | number;
    setSeed(state: string | number): this;
    setState(state: SerializedRng): this;
    shuffle<T>(array: T[]): T[];
}

Implemented by

Methods

  • Type Parameters

    • T

    Parameters

    • array: T[]

    Returns null | T

  • Parameters

    • Optionalmean: number
    • Optionalstddev: number

    Returns number

  • Parameters

    • lowerBound: number
    • upperBound: number

    Returns number

  • Parameters

    • data: {
          [key: string]: number;
          [key: number]: number;
      }
      • [key: string]: number
      • [key: number]: number

    Returns string | number

  • Parameters

    • state: string | number

    Returns this