Android 台灣中文網
標題:
(觸摸精靈)隨機數字如何產生
[打印本頁]
作者:
ccw3230
時間:
2015-10-1 10:18
標題:
(觸摸精靈)隨機數字如何產生
本帖最後由 ccw3230 於 2015-10-1 16:10 編輯
最近有遇到需增加一個隨機亂數,分享給大家
math.randomseed(os.time()); --reset亂數種子
if math.random(0,1)>0 then
--do something
end
[groupid=824]GST 團隊[/groupid]
歡迎光臨 Android 台灣中文網 (https://apk.tw/)
Powered by Discuz! X3.1