diff options
author | kwolekr <kwolekr@minetest.net> | 2016-06-04 02:16:06 -0400 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2016-06-04 02:16:06 -0400 |
commit | 8ed467d438634ffe45806a6a6a325bb00774d651 (patch) | |
tree | e699568c7b3b91ee37e85ed3cf8880d63b3917cb /doc | |
parent | dfbdb5bcd7bc48efb21d585d5c22454a9d5f0f1e (diff) | |
download | minetest-8ed467d438634ffe45806a6a6a325bb00774d651.tar.gz minetest-8ed467d438634ffe45806a6a6a325bb00774d651.tar.bz2 minetest-8ed467d438634ffe45806a6a6a325bb00774d651.zip |
PcgRandom: Fix/improve documentation
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index aa0d7e45d..f348f5103 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -2865,7 +2865,9 @@ It can be created via `PcgRandom(seed)` or `PcgRandom(seed, sequence)`. * `next()`: return next integer random number [`-2147483648`...`2147483647`] * `next(min, max)`: return next integer random number [`min`...`max`] * `rand_normal_dist(min, max, num_trials=6)`: return normally distributed random number [`min`...`max`] - * This is only a rough approximation of a normal distribution with mean=(max-min)/2 and variance=1 + * This is only a rough approximation of a normal distribution with: + * mean = (max - min) / 2, and + * variance = (((max - min + 1) ^ 2) - 1) / (12 * num_trials) * Increasing num_trials improves accuracy of the approximation ### `SecureRandom` |