Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Uniform

Represents a random variable with a uniform distribution based on given min and max values.

For more information on uniform distributions see uniform distribution.

Hierarchy

Index

Constructors

Accessors

Methods

Constructors

constructor

  • new Uniform(min: number, max: number, seed?: number): Uniform
  • Initializes a new instance of the Uniform class.

    Parameters

    • min: number

      Minimum generated value.

    • max: number

      Minimum generated value.

    • Optional seed: number

      Optional value used to initialize the random sequence.

    Returns Uniform

Accessors

max

  • get max(): number
  • Gets the maximum generated value.

    Returns number

min

  • get min(): number
  • Gets the minimum generated value.

    Returns number

Methods

sample

  • sample(): number
  • Gets a random value uniformly distributed between min and max.

    Returns number

Generated using TypeDoc