'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.
This commit is contained in:
1 parent
c5feac2b5e
commit
9eca305e75
3 files changed
+36
-20
No files matched your search
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user