Examples:
static : block: var rando: MersenneTwister = newMersenneTwister(uint32.high) ## Must be "var". doAssert rando.getNum() != rando.getNum() ## Pseudo random number. Works at compile-time.
Procs
proc newMersenneTwister(seed: uint32): MersenneTwister {...}{.raises: [], tags: [].}
- Source Edit
proc getNum(m: var MersenneTwister): uint32 {...}{.raises: [], tags: [].}
- Returns the next pseudo random number ranging from 0 to high(uint32) Source Edit