1
0
mirror of https://github.com/kepler155c/opus synced 2025-01-13 17:10:28 +00:00

Fixed util.signum

This commit is contained in:
sorucoder 2018-12-09 14:52:52 -05:00
parent 2e94b61dff
commit eb8b823674

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)