# Round (Integer)

Grammar — Round(x)
FlagsNative | Function

Returns the value rounded to zero decimal places.

# Arguments

  • fixed — Value

Returns — int

native int RoundI(fixed x);

Category: Math / Arithmetic

# Examples

# mods/heroes.stormmod

MapScript.galaxy

// L726
RoundI(gv_heroLevelTime[lp_level])
// L726
RoundI(gv_heroLevelTime[lp_level])

# mods/heroesbrawlmods/brawlmapmods/coop/deadmansstand.stormmod

LibPEB1.galaxy

// 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

LibCOMI.galaxy

// 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

LibCOUI.galaxy

// 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

WarCoopData.galaxy

// 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))