aboutsummaryrefslogtreecommitdiff
path: root/manual
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-07-17 16:00:24 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-07-17 16:00:24 -0300
commit4eefef07ab1c136f901d816822c79336fa89336d (patch)
treece2232ba8a09287899af1ac07af0c902800bfae6 /manual
parent9c28ed05c95cb6854d917ac3e3ed7be9ae109480 (diff)
downloadlua-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.of3
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.
7798When called with no arguments, 7798When called with no arguments,
7799Lua generates a seed with 7799Lua generates a seed with
7800a weak attempt for randomness. 7800a weak attempt for randomness.
7801In this case,
7802the call returns the two seed components that were used.
7803
7801To ensure a required level of randomness to the initial state 7804To 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,
7803for instance when debugging a program), 7806for instance when debugging a program),