Convert math.random percentage computations into percent()
This commit is contained in:
committed by
Pasi Kallinen
parent
c4bb3c904f
commit
35a2f6e3ed
@@ -39,5 +39,5 @@ end
|
||||
|
||||
-- percent(20) returns true 20% of the time
|
||||
function percent(threshold)
|
||||
return math.random(0,99) < threshold
|
||||
return math.random(0, 99) < threshold
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user