Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IRNG

An interface for random number generators. Any random number generator from this library will implement the following, and this library can use any custom generator that implements the following.

Hierarchy

  • IRNG

Implemented by

Index

Methods

next

  • next(min?: undefined | number, max?: undefined | number): number
  • Parameters

    • Optional min: undefined | number
    • Optional max: undefined | number

    Returns number

nextBoolean

  • nextBoolean(): boolean

nextInt

  • nextInt(min?: undefined | number, max?: undefined | number): number
  • Parameters

    • Optional min: undefined | number
    • Optional max: undefined | number

    Returns number

nextItem

  • nextItem<T>(array: T[]): T | undefined
  • Type parameters

    • T

    Parameters

    • array: T[]

    Returns T | undefined

reset

  • reset(): void

shuffle

  • shuffle<T>(array: T[]): T[]
  • Type parameters

    • T

    Parameters

    • array: T[]

    Returns T[]

Generated using TypeDoc