PseudoRandom

From Minetest Developer Wiki
(Redirected from PseudoRandom:next)
Jump to: navigation, search

A pseudorandom number generator. Can be created via PseudoRandom(seed).
Note that math.random works about 17 times as fast as this.

Methods

  • next() — return next integer random number [0...32767]
  • next(min, max) — return next integer random number [min...max]; max - min must be 32767 or <= 6553 due to the simple implementation making bad distribution otherwise.
Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox