From 4eefef07ab1c136f901d816822c79336fa89336d Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 17 Jul 2019 16:00:24 -0300 Subject: '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. --- manual/manual.of | 3 +++ 1 file changed, 3 insertions(+) (limited to 'manual') 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. 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. + To ensure a required level of randomness to the initial state (or contrarily, to have a deterministic sequence, for instance when debugging a program), -- cgit v1.2.3-55-g6feb