# Round (Real)
Grammar — Round(x)
Flags —Native
|Function
Returns the value rounded to zero decimal places.
# Arguments
fixed
— Value
Returns — fixed
native fixed Round(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/heroesdata.stormmod
// L1378
Round((EventUnitDamageAttemptedVitals() + EventUnitDamageBehaviorShield()))
# mods/heroesdata.stormmod
// 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
// 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
// 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
// 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))))