diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-03-13 14:47:48 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-03-13 14:47:48 -0300 |
| commit | 9eca305e75010e30342486a4139846faf1b3eccb (patch) | |
| tree | db2df6774e7c4eb63d2310772507c47e32223cdd /testes/math.lua | |
| parent | c5feac2b5edf86aa9bdc4b8acd5380f2fe9e197f (diff) | |
| download | lua-github-9eca305e75010e30342486a4139846faf1b3eccb.tar.gz | |
'math.randomseed()' sets a somewhat random seed
When called with no arguments, 'math.randomseed' uses time and ASLR
to generate a somewhat random seed. the initial seed when Lua starts
is generated this way.
Diffstat (limited to 'testes/math.lua')
| -rw-r--r-- | testes/math.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/testes/math.lua b/testes/math.lua index dc5b84f6..b010ff6c 100644 --- a/testes/math.lua +++ b/testes/math.lua @@ -838,7 +838,7 @@ do assert(rand * 2^floatbits == res) end -math.randomseed(0, os.time()) +math.randomseed() do -- test random for floats local randbits = math.min(floatbits, 64) -- at most 64 random bits |
