diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-07-17 16:00:24 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-07-17 16:00:24 -0300 |
| commit | 4eefef07ab1c136f901d816822c79336fa89336d (patch) | |
| tree | ce2232ba8a09287899af1ac07af0c902800bfae6 /manual | |
| parent | 9c28ed05c95cb6854d917ac3e3ed7be9ae109480 (diff) | |
| download | lua-4eefef07ab1c136f901d816822c79336fa89336d.tar.gz lua-4eefef07ab1c136f901d816822c79336fa89336d.tar.bz2 lua-4eefef07ab1c136f901d816822c79336fa89336d.zip | |
'math.randomseed()' returns the seeds it used
A call to 'math.randomseed()' returns the two components of the seed
it set, so that they can be used to set that same seed again.
Diffstat (limited to 'manual')
| -rw-r--r-- | manual/manual.of | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/manual/manual.of b/manual/manual.of index 3d2fb4fb..7f2596fa 100644 --- a/manual/manual.of +++ b/manual/manual.of | |||
| @@ -7798,6 +7798,9 @@ The default for @id{y} is zero. | |||
| 7798 | When called with no arguments, | 7798 | When called with no arguments, |
| 7799 | Lua generates a seed with | 7799 | Lua generates a seed with |
| 7800 | a weak attempt for randomness. | 7800 | a weak attempt for randomness. |
| 7801 | In this case, | ||
| 7802 | the call returns the two seed components that were used. | ||
| 7803 | |||
| 7801 | To ensure a required level of randomness to the initial state | 7804 | To ensure a required level of randomness to the initial state |
| 7802 | (or contrarily, to have a deterministic sequence, | 7805 | (or contrarily, to have a deterministic sequence, |
| 7803 | for instance when debugging a program), | 7806 | for instance when debugging a program), |
