1
0
Fork 0
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:
sfan5 2024-01-10 20:08:00 +01:00
parent d20f1182f2
commit e824e9023f
5 changed files with 22 additions and 20 deletions

View file

@ -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)