Difference between revisions of "Math.randomseed"

From OpenEUO
Jump to: navigation, search
(Created page with " math.randomseed (x) Sets x as the "seed" for the pseudo-random generator: equal seeds produce equal sequences of numbers.")
 
Line 1: Line 1:
 
  math.randomseed (x)
 
  math.randomseed (x)
  
Sets x as the "seed" for the pseudo-random generator: equal seeds produce equal sequences of numbers.
+
Sets x as the "seed" for the pseudo-random generator: equal seeds produce equal sequences of numbers.  Unknown whether the underlying function is thread safe, so don't assume that multiple scripts utilizing math.random are generating independent streams of pseudo-random numbers.

Revision as of 20:25, 7 October 2010

math.randomseed (x)

Sets x as the "seed" for the pseudo-random generator: equal seeds produce equal sequences of numbers. Unknown whether the underlying function is thread safe, so don't assume that multiple scripts utilizing math.random are generating independent streams of pseudo-random numbers.