github.com/hirochachacha/plua@v0.0.0-20170217012138-c82f520cc725/stdlib/math/testdata/random.lua (about) 1 i = math.random() 2 assert(0 <= i and i <= 1) 3 4 i = math.random(4) 5 assert(1 <= i and i <= 4) 6 7 i = math.random(4, 9) 8 assert(4 <= i and i <= 9)