mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
Simplify LuaPseudoRandom::l_next and fix docs
Also extends the allowed range on the C++ side. This has no side-effects.
This commit is contained in:
parent
d20f1182f2
commit
e824e9023f
5 changed files with 22 additions and 20 deletions
|
@ -6,6 +6,8 @@ local function test_random()
|
|||
|
||||
local pr2 = PseudoRandom(-101)
|
||||
assert(pr2:next(0, 100) == 35)
|
||||
-- unusual case that is normally disallowed:
|
||||
assert(pr2:next(10000, 42767) == 12485)
|
||||
end
|
||||
unittests.register("test_random", test_random)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue