From 30640fd415e8b7d636bdc5995fd73275039d6eae Mon Sep 17 00:00:00 2001 From: sorucoder <40341154+sorucoder@users.noreply.github.com> Date: Sun, 9 Dec 2018 01:01:20 -0500 Subject: [PATCH] Fixed util.randomFloat Fixed if max is nil, that it behaves like math.random() --- sys/apis/util.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/apis/util.lua b/sys/apis/util.lua index 7638613..cc59848 100644 --- a/sys/apis/util.lua +++ b/sys/apis/util.lua @@ -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