lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> The Lua Wiki Math Library Tutorial page[1] says:
> "But beware! The first random number you get is not really 'randomized'
> (at least in Windows 2K and OS X)."

That's the way Pseudorandom number generators usually work. See
	http://en.wikipedia.org/wiki/Pseudo-random_number_generator

To fix that, start your program with
	math.randomseed(os.time())
for instance.
--lhf