Develop 1.8 #20

Merged
Kan18 merged 242 commits from develop-1.8 into master-1.8 2019-11-10 20:52:08 -05:00
Showing only changes of commit a6c8ecccd4 - Show all commits

View File

@@ -132,12 +132,13 @@ end
-- http://lua-users.org/wiki/SimpleRound -- http://lua-users.org/wiki/SimpleRound
function Util.round(num, idp) function Util.round(num, idp)
local mult = 10^(idp or 0) local mult = 10^(idp or 0)
return util.signum(num) * math.floor(math.abs(num) * mult + 0.5) / mult return Util.signum(num) * math.floor(math.abs(num) * mult + 0.5) / mult
end end
function Util.random(max, min) function Util.randomFloat(max, min)
min = min or 0 min = min or 0
return math.random(0, max-min) + min max = max or 1
return (max-min) * math.random() + min
end end
--[[ Table functions ]] -- --[[ Table functions ]] --