mirror of
https://github.com/kepler155c/opus
synced 2025-01-13 09:00:27 +00:00
Fixed util.signum
This commit is contained in:
parent
2e94b61dff
commit
eb8b823674
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user