[v150] CS Influence & decimal places

@Core Xii
Yes, the "1" at the end of my first post's quote is the number of decimal places. Civ does not inherently provide a rounding function. This is what I use:
PHP:
function Game.Round(num, places)
    local mult = 10^(places or 0)
    return math.floor(num * mult + 0.5) / mult
end
 
Back
Top Bottom