From 68625b047f1fdebba747a83630163af99faf17e3 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Wed, 28 Mar 2012 21:16:47 +0300 Subject: Add range option to PseudoRandom:next() --- doc/lua_api.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc/lua_api.txt') 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 -------------------- -- cgit v1.2.3