# Round (Real)

Grammar — Round(x)
FlagsNative | Function

Returns the value rounded to zero decimal places.

# Arguments

  • fixed — Value

Returns — fixed

native fixed Round(fixed x);

Category: Math / Arithmetic

# Examples

# mods/heroesdata.stormmod

SoundLib.galaxy

// L1378
Round((EventUnitDamageAttemptedVitals() + EventUnitDamageBehaviorShield()))

# mods/heroesdata.stormmod

UILib.galaxy

// L11701
Round(CatalogFieldValueGetAsFixed(c_gameCatalogBehavior, lv_shieldBehavior, "DamageResponse.ModifyLimit", lv_launchPlayer))
// L11702
Round(CatalogFieldValueGetAsFixed(c_gameCatalogBehavior, lv_shieldBehavior, "DamageResponse.ModifyLimitVitalMaxFractionArray[" + IntToString(2) + "]", lv_launchPlayer))
// L11704
Round((lv_amount * UnitGetPropertyFixed(lv_targetUnit, c_unitPropLifeMax, c_unitPropCurrent)))
// L11708
Round((lv_amount * UnitGetPropertyFixed(lv_targetUnit, c_unitPropEnergyMax, c_unitPropCurrent)))
// L11712
Round(CatalogFieldValueGetAsFixed(c_gameCatalogBehavior, lv_shieldBehavior, "DamageResponse.ModifyLimit", lv_launchPlayer))

# mods/novastoryassets.sc2mod

MapScript.galaxy

// L1001
Round(PointGetX(UnitGetPosition(lp_sporeCrawler)))
// L1001
Round(PointGetY(UnitGetPosition(lp_sporeCrawler)))
// L4688
Round(PointGetFacing(PointFromId(599)))
// L1001
Round(PointGetX(UnitGetPosition(lp_sporeCrawler)))
// L1001
Round(PointGetY(UnitGetPosition(lp_sporeCrawler)))
// L4688
Round(PointGetFacing(PointFromId(599)))

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L5537
Round(libCOMI_gv_cM_Mengsk_EnergyRegenRoyalGuard)
// L5561
Round(libCOMI_gv_cM_Mengsk_EnergyRegenTrooper)
// L22167
Round((lv_xp / lv_veterancount))
// L30295
Round(lv_reviveTimer[lv_itPlayer])

# mods/starcoop/starcoop.sc2mod

LibCOOC.galaxy

// L486
Round(((IntToFixed(libCOOC_gf_MissionObjectiveProgress(lp_objective))*IntToFixed(UserDataGetInt("Experience", "GameValues", "BonusObjExperience", 1))*UserDataGetFixed("MissionObjective", libCOOC_gf_CS_ObjectiveUserDataInstance(lp_objective), "XPMultiplier", 1))/IntToFixed(libCOOC_gf_MissionObjectiveItemCount(lp_objective))))