Fixed util.randomFloat

Fixed if max is nil, that it behaves like math.random()
This commit is contained in:
sorucoder 2018-12-09 01:01:20 -05:00
parent 3f3a2deaa8
commit 30640fd415
1 changed files with 1 additions and 0 deletions

View File

@ -137,6 +137,7 @@ end
function Util.randomFloat(max, min)
min = min or 0
max = max or 0
return (max-min) * math.random() + min
end