Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "random/iter/discrete-uniform/docs/types/index.d"

Index

Interfaces

Functions

Functions

iterator

  • Returns an iterator for generating pseudorandom numbers drawn from a discrete uniform distribution.

    throws

    a must be an integer

    throws

    b must be an integer

    throws

    a must be less than b

    throws

    must provide valid options

    Parameters

    • a: number

      minimum support

    • b: number

      maximum support

    • Optional options: Options

      function options

    Returns RandIter

    iterator

    Example

    var iter = iterator( 2, 6 );
    
    var r = iter.next().value;
    // returns <number>
    
    r = iter.next().value;
    // returns <number>
    
    r = iter.next().value;
    // returns <number>
    
    // ...