mirror of
https://github.com/kepler155c/opus
synced 2025-08-29 17:08:02 +00:00
Fixed util.randomFloat
Fixed if both max or min is nil, it returns a number between 0 and 1
This commit is contained in:
@@ -137,7 +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
|
max = max or 1
|
||||||
return (max-min) * math.random() + min
|
return (max-min) * math.random() + min
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user