diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/extensions.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/extensions.html b/doc/extensions.html index c1c9a808..e9aaa096 100644 --- a/doc/extensions.html +++ b/doc/extensions.html | |||
@@ -265,7 +265,7 @@ and let the GC do its work. | |||
265 | LuaJIT uses a Tausworthe PRNG with period 2^223 to implement | 265 | LuaJIT uses a Tausworthe PRNG with period 2^223 to implement |
266 | <tt>math.random()</tt> and <tt>math.randomseed()</tt>. The quality of | 266 | <tt>math.random()</tt> and <tt>math.randomseed()</tt>. The quality of |
267 | the PRNG results is much superior compared to the standard Lua | 267 | the PRNG results is much superior compared to the standard Lua |
268 | implementation, which uses the platform-specific ANSI rand(). | 268 | implementation, which uses the platform-specific ANSI <tt>rand()</tt>. |
269 | </p> | 269 | </p> |
270 | <p> | 270 | <p> |
271 | The PRNG generates the same sequences from the same seeds on all | 271 | The PRNG generates the same sequences from the same seeds on all |
@@ -276,6 +276,10 @@ It's correctly scaled up and rounded for <tt>math.random(n [,m])</tt> to | |||
276 | preserve uniformity. | 276 | preserve uniformity. |
277 | </p> | 277 | </p> |
278 | <p> | 278 | <p> |
279 | Call <tt>math.randomseed()</tt> without any arguments to seed it from | ||
280 | system entropy. | ||
281 | </p> | ||
282 | <p> | ||
279 | Important: Neither this nor any other PRNG based on the simplistic | 283 | Important: Neither this nor any other PRNG based on the simplistic |
280 | <tt>math.random()</tt> API is suitable for cryptographic use. | 284 | <tt>math.random()</tt> API is suitable for cryptographic use. |
281 | </p> | 285 | </p> |