Function exponential

  • exponential(state: RngState, rate: number): number
  • Generate a exponentially distributed random number from the general distribution. Using randomExponential to generate values with rate of 1 may be slightly faster.

    Parameters

    • state: RngState

      Random number state

    • rate: number

      The rate parameter (sometimes this distribution is parameterised by scale, which is 1 / rate)

    Returns number

Generated using TypeDoc