Fixed util.signum

This commit is contained in:
sorucoder 2018-12-09 14:52:52 -05:00
parent 2e94b61dff
commit eb8b823674
1 changed files with 1 additions and 1 deletions

View File

@ -132,7 +132,7 @@ end
-- http://lua-users.org/wiki/SimpleRound
function Util.round(num, idp)
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
function Util.randomFloat(max, min)