PercentToInt
- Parameters
-
percentage real
max integer
- return type
integer
- Source code
function PercentToInt takes real percentage, integer max returns integer local real realpercent = percentage * I2R(max) * 0.01 local integer result = MathRound(realpercent) if (result < 0) then set result = 0 elseif (result > max) then set result = max endif return result endfunction
- Source
- Blizzard.j
- wc3modding.com
- PercentToInt