Fixed util.randomFloat

Fixed if both max or min is nil, it returns a number between 0 and 1
This commit is contained in:
sorucoder 2018-12-09 01:04:24 -05:00
parent 30640fd415
commit 2e94b61dff
1 changed files with 1 additions and 1 deletions

View File

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