You need to run math.randomseed() once before using math.random() , like this: math.randomseed(os.time()). From your comment that you saw ... ... <看更多>
Search
Search
You need to run math.randomseed() once before using math.random() , like this: math.randomseed(os.time()). From your comment that you saw ... ... <看更多>
Random strings in Lua. GitHub Gist: instantly share code, notes, and snippets. ... <看更多>
Lua 随机数算法用的是libc 中的 rand , 也就是LCG。 ... num = {} for j=1,10 do table.insert(num, math.random(100)) end print(table.concat(num, ... ... <看更多>
... <看更多>