# Round (Integer)
Grammar — Round(x)
Flags —Native
|Function
Returns the value rounded to zero decimal places.
# Arguments
fixed
— Value
Returns — int
native int RoundI(fixed x);
# Related
Category: Math / Arithmetic
- [F] —
int
— Absolute Value (Integer) — ( AbsI ) - [F] —
fixed
— Absolute Value (Real) — ( AbsF ) - [F] —
int
— Arithmetic (Integer) — ( ) - [F] —
int
— Bitwise Arithmetic (Integer) — ( ) - [F] —
fixed
— Arithmetic (Real) — ( ) - [F] —
int
— Arithmetic Multiple (Integer) — ( ) - [F] —
int
— Bitwise Arithmetic Multiple (Integer) — ( ) - [F] —
fixed
— Arithmetic Multiple (Real) — ( ) - [F] —
int
— Ceiling (Integer) — ( CeilingI ) - [F] —
fixed
— Ceiling (Real) — ( Ceiling ) - [F] —
int
— Clamp (Integer) — ( libNtve_gf_ArithmeticIntClamp ) - [F] —
fixed
— Clamp (Real) — ( libNtve_gf_ArithmeticRealClamp ) - [F] —
void
— Cycle — ( ) - [F] —
int
— Floor (Integer) — ( FloorI ) - [F] —
fixed
— Floor (Real) — ( Floor ) - [F] —
int
— Log2 (Integer) — ( Log2I ) - [F] —
fixed
— Log2 (Real) — ( Log2 ) - [F] —
fixed
— Log (Real) — ( libNtve_gf_Log ) - [F] —
int
— Modulo (Integer) — ( ModI ) - [F] —
fixed
— Modulo (Real) — ( ModF ) - [F] —
int
— Power (Integer) — ( PowI ) - [F] —
fixed
— Power (Real) — ( Pow ) - [F] —
int
— Round (Integer) — ( RoundI ) - [F] —
fixed
— Round (Real) — ( Round ) - [F] —
int
— Pow2 (Integer) — ( Pow2I ) - [F] —
fixed
— Pow2 (Real) — ( Pow2 ) - [F] —
int
— Square Root (Integer) — ( SquareRootI ) - [F] —
fixed
— Square Root (Real) — ( SquareRoot ) - [F] —
int
— Trunc (Integer) — ( TruncI ) - [F] —
fixed
— Trunc (Real) — ( Trunc )
# Examples
# mods/heroes.stormmod
// L726
RoundI(gv_heroLevelTime[lp_level])
// L726
RoundI(gv_heroLevelTime[lp_level])
# mods/heroesbrawlmods/brawlmapmods/coop/deadmansstand.stormmod
// L4514
RoundI((lv_oldWidth + (lv_itDelta * lv_itIndex)))
// L12237
RoundI((lv_barWidthDefaultCore_C * lv_lifePercentCore))
// L12270
RoundI((lv_barWidthDefaultCore_C * lv_lifePercentKeep))
// L12303
RoundI((lv_barWidthDefaultCore_C * lv_lifePercentBunker))
# mods/starcoop/starcoop.sc2mod
// L3301
RoundI(lv_difficulty)
// L4219
RoundI(((lv_costMinerals * lv_r) / 100.0))
// L4220
RoundI(((lv_costVespene * lv_r) / 100.0))
// L5482
RoundI((UnitGetPropertyFixed(lp_mengskGlobalCaster, c_unitPropEnergy, c_unitPropCurrent) + 1))
// L5824
RoundI(libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogAbil, "DeployPowerTowerStetmann", "InfoArray[" + IntToString(lv_oldchargelevel) + "].Charge.CountMax", lp_player))
// L5825
RoundI(libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogAbil, "DeployPowerTowerStetmann", "InfoArray[" + IntToString(libCOMI_gv_cM_Stetmann_StetelliteChargesLevel) + "].Charge.CountMax", lp_player))
// L6057
RoundI((lp_multiplyMinerals * libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogUnit, lv_uT, "CostResource[" + IntToString(0) + "]", c_playerAny) * lv_costfactor))
// L6058
RoundI((lp_multiplyMinerals * libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogUnit, lv_uT, "CostResource[" + IntToString(1) + "]", c_playerAny) * lv_costfactor))
// L6166
RoundI((lv_ragemultiplier * (lv_ragecost + lv_extrarage)))
// L6192
RoundI((UserDataGetFixed("CoopAbilityTychusRageBuffs", lp_rageBuff, "Rage Factor", 1) * UnitGetPropertyFixed(lp_tychusUnit, c_unitPropEnergy, c_unitPropCurrent)))
# mods/starcoop/starcoop.sc2mod
// L632
RoundI(libNtve_gf_DialogItemValue(libCOUI_gv_cU_RandomMutationSelectMinSlider, 1))
// L632
RoundI(libNtve_gf_DialogItemValue(libCOUI_gv_cU_RandomMutationSelectMaxSlider, 1))
// L4566
RoundI(PlayerGetChargeUsed(lp_player, "Abil/DeployPowerTowerStetmann"))
// L4796
RoundI(UnitGetPropertyFixed(lp_casterUnit, c_unitPropEnergy, c_unitPropCurrent))
// L6549
RoundI(libNtve_gf_DialogItemValue(libCOUI_gv_cU_RandomMutationSelectMinSlider, EventPlayer()))
// L6550
RoundI(libNtve_gf_DialogItemValue(libCOUI_gv_cU_RandomMutationSelectMaxSlider, EventPlayer()))
// L6551
RoundI(libNtve_gf_DialogItemValue(libCOUI_gv_cU_RandomMutationSelectMinMutSlider, EventPlayer()))
// L6552
RoundI(libNtve_gf_DialogItemValue(libCOUI_gv_cU_RandomMutationSelectMaxMutSlider, EventPlayer()))
// L6554
RoundI(libNtve_gf_DialogItemValue(libCOUI_gv_cU_RandomMutationSelectMinSlider, EventPlayer()))
// L6555
RoundI(libNtve_gf_DialogItemValue(libCOUI_gv_cU_RandomMutationSelectMaxSlider, EventPlayer()))
# mods/warcoop/warcoopdata.sc2mod
// L1090
RoundI(((libWCdr_gf_GetDifficultyMultiplier("EnemyDamageMultiplier", lp_difficultyLevel) + 1.0) * 100.0))
// L1091
RoundI(((libWCdr_gf_GetDifficultyMultiplier("EnemyHPMultiplier", lp_difficultyLevel) + 1.0) * 100.0))
// L1092
RoundI(((libWCdr_gf_GetDifficultyMultiplier("BucketMultiplier", lp_difficultyLevel) + 1.0) * 100.0))
// L2505
RoundI(((lv_healthmultiplier + 1.0) * libWCdr_gv_legends.lv_playerCountHandicap * 100.0))
// L2506
RoundI(((lv_damagemultiplier + 1.0) * 100.0))
// L2612
RoundI(UserDataGetFixed("LegionDifficultyScaling", lv_difficultyscalinginstance, "Value", 1))
// L2637
RoundI((lv_scalingperlevel * 100.0))
// L3321
RoundI(libNtve_gf_DialogItemValue(libWCdr_gv_debugHeroSelectUI.lv_optionsPanel.lv_difficultySlider, 1))