diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-03-28 21:16:47 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-03-28 22:01:23 +0300 |
commit | 68625b047f1fdebba747a83630163af99faf17e3 (patch) | |
tree | c5e3b6ca815c443689fd86bdb3af2c880dbbdd1e /doc | |
parent | 9a1df7bf3879bc77025779f11f4a99943572931f (diff) | |
download | minetest-68625b047f1fdebba747a83630163af99faf17e3.tar.gz minetest-68625b047f1fdebba747a83630163af99faf17e3.tar.bz2 minetest-68625b047f1fdebba747a83630163af99faf17e3.zip |
Add range option to PseudoRandom:next()
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index ae6771be5..68fbcee8c 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -632,7 +632,10 @@ methods: PseudoRandom: A pseudorandom number generator - Can be created via PseudoRandom(seed) methods: -- next(): return next random number [0...32767] +- next(): return next integer random number [0...32767] +- next(min, max): return next integer random number [min...max] + (max - min) must be 32767 or <= 6553 due to the simple + implementation making bad distribution otherwise. Registered entities -------------------- |