Class RngStateBuiltin

Random number generator based on the Math.random() builtin, which does not give good quality random numbers, but at least is available everywhere. This generator cannot be seeded.

Hierarchy

Constructors

Methods

Constructors

Methods

  • getState(): any
  • Get the entire internal state of a generator

    Returns any

  • random(): number
  • Generate a single random number on the interval [0, 1], updating whatever internal state the generator uses.

    Returns number

  • setSeed(seed: any): void
  • Set the seed of the generator; most generators should support this but RngStateBuiltin does not, and a cryptographically secure generator also may not.

    Parameters

    • seed: any

    Returns void

  • setState(state: any): void
  • Replace the entire internal state of a generator

    Parameters

    • state: any

    Returns void

Generated using TypeDoc