'math.randomseed' always returns the two seed components

This commit is contained in:
Roberto Ierusalimschy
2019-07-19 13:31:53 -03:00
parent 3c0d3c6fbe
commit 2f22c6bb79
3 changed files with 15 additions and 11 deletions

View File

@@ -7798,8 +7798,10 @@ The default for @id{y} is zero.
When called with no arguments,
Lua generates a seed with
a weak attempt for randomness.
In this case,
the call returns the two seed components that were used.
This function returns the two seed components
that were effectively used,
so that setting them again repeats the sequence.
To ensure a required level of randomness to the initial state
(or contrarily, to have a deterministic sequence,