Merge pull request #37 from Eugene8388608/patch-2

Update advancedLua.lua
This commit is contained in:
Igor Timofeev 2017-04-24 23:40:45 +03:00 committed by GitHub
commit b60cd7f4fa

View File

@ -115,7 +115,7 @@ end
function math.roundToDecimalPlaces(num, decimalPlaces)
local mult = 10 ^ (decimalPlaces or 0)
return math.floor(num * mult + 0.5) / mult
return math.round(num * mult) / mult
end
function math.getDigitCount(num)