在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
Math.seed = 5 Math.seededRandom = function(max, min) max = max or 1 min = min or 0 Math.seed = (Math.seed * 9301 + 49297) % 233280 local rnd = Math.seed / 233280.0 return min + rnd * (max - min) end for i = 1, 2 do print(Math.seededRandom()) end local max1 = 0 local seed1 = 0 while 1 do seed1 = Math.seededRandom() if max1 < seed1 then max1 = seed1 print(max1) end end
|
请发表评论