mirror of
https://github.com/kepler155c/opus
synced 2025-06-26 15:12:50 +00:00
Fixed util.randomFloat
Fixed if max is nil, that it behaves like math.random()
This commit is contained in:
parent
3f3a2deaa8
commit
30640fd415
@ -137,6 +137,7 @@ end
|
|||||||
|
|
||||||
function Util.randomFloat(max, min)
|
function Util.randomFloat(max, min)
|
||||||
min = min or 0
|
min = min or 0
|
||||||
|
max = max or 0
|
||||||
return (max-min) * math.random() + min
|
return (max-min) * math.random() + min
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user