Skip to content

Class: MT19937

Functions

NameDescription
.new(seed)

Methods

NameDescription
:pick(table)
:randInt(min,max)
:randReal(min,max)
:randSeed()

Function declarations

Function: new

lua
function MT19937.new(
    seed
) end

Parameters:

  • seed (integer)

Returns:

Method declarations

Method: pick

lua
function MT19937:pick(
    table
) end

Parameters:

  • table (table) - The table to randomly pick from, must be an array, index starting from 1

Returns:

  • any

Method: randInt

lua
function MT19937:randInt(
    min,
    max
) end

Parameters:

  • min (integer) - Inclusive
  • max (integer) - Inclusive

Returns:

  • integer

Method: randReal

lua
function MT19937:randReal(
    min,
    max
) end

Parameters:

  • min (number)
  • max (number)

Returns:

  • number

Method: randSeed

lua
function MT19937:randSeed() end

Returns:

  • integer