# Maximum (Real)
Grammar — Max(value1, value2)
Flags —Native
|Function
Returns the highest of the two real values specified.
# Arguments
fixed
— Value 1fixed
— Value 2
Returns — fixed
native fixed MaxF(fixed x1, fixed x2);
# Related
Category: Math / Conditionals
- [F] —
int
— Minimum (Integer) — ( MinI ) - [F] —
fixed
— Minimum (Real) — ( MinF ) - [F] —
int
— Maximum (Integer) — ( MaxI ) - [F] —
fixed
— Maximum (Real) — ( MaxF )
# Examples
# campaigns/liberty.sc2campaign
// L1177
MaxF(gf_ConvertShooterXToMapX(5.0), MinF(gf_ConvertShooterXToMapX(15.0), lv_xNew))
// L2985
MaxF(lv_xLeft, MinF(lv_xRight, PointGetX(lv_center)))
// L2986
MaxF(lv_yBottom, MinF(lv_yTop, PointGetY(lv_center)))
// L4423
MaxF((lv_wavePeriod - 150.0), 0.0)
// L4479
MaxF((lv_wavePeriod - 150.0), 0.0)
// L7075
MaxF(UnitGetPropertyFixed(gv_tHEONEBROODMOTHER, c_unitPropLife, c_unitPropCurrent), (gv_queenHP * 0.75))
// L7169
MaxF(UnitGetPropertyFixed(gv_tHEONEBROODMOTHER, c_unitPropLife, c_unitPropCurrent), (gv_queenHP * 0.5))
// L7219
MaxF(UnitGetPropertyFixed(gv_tHEONEBROODMOTHER, c_unitPropLife, c_unitPropCurrent), (gv_queenHP * 0.35))
// L1177
MaxF(gf_ConvertShooterXToMapX(5.0), MinF(gf_ConvertShooterXToMapX(15.0), lv_xNew))
// L2985
MaxF(lv_xLeft, MinF(lv_xRight, PointGetX(lv_center)))
// L2986
MaxF(lv_yBottom, MinF(lv_yTop, PointGetY(lv_center)))
// L4423
MaxF((lv_wavePeriod - 150.0), 0.0)
// L4479
MaxF((lv_wavePeriod - 150.0), 0.0)
// L7075
MaxF(UnitGetPropertyFixed(gv_tHEONEBROODMOTHER, c_unitPropLife, c_unitPropCurrent), (gv_queenHP * 0.75))
// L7169
MaxF(UnitGetPropertyFixed(gv_tHEONEBROODMOTHER, c_unitPropLife, c_unitPropCurrent), (gv_queenHP * 0.5))
// L7219
MaxF(UnitGetPropertyFixed(gv_tHEONEBROODMOTHER, c_unitPropLife, c_unitPropCurrent), (gv_queenHP * 0.35))
# campaigns/libertystory.sc2campaign
// L1682
MaxF((lv_ret - lv_gap), 0.0)
// L11790
MaxF(lv_waitDuration, 0.0)
// L11922
MaxF(lv_waitDuration, 0.0)
# campaigns/swarm.sc2campaign
// L4409
MaxF((lv_life - 0.5), 0.0)
// L4409
MaxF((lv_life - 0.5), 0.0)
# campaigns/swarmstory.sc2campaign
// L4489
MaxF(PlayerGetPropertyFixed(lp_player, c_playerPropDamageDealtTime), PlayerGetPropertyFixed(lp_player, c_playerPropDamageTakenTime))
# campaigns/voidstory.sc2campaign
— VoidCampaignMissionLib.galaxy
// L2538
MaxF(PlayerGetPropertyFixed(lp_player, c_playerPropDamageDealtTime), PlayerGetPropertyFixed(lp_player, c_playerPropDamageTakenTime))
// L4838
MaxF((1-(lv_distance/50)), 0.0)
# mods/core.sc2mod
// L2042
MaxF(lp_duration, 1.5)
// L2089
MaxF(lp_duration, 1.5)
// L1732
MaxF(lp_duration, 1.5)
// L1779
MaxF(lp_duration, 1.5)
# mods/heroesbrawlmods/brawlmapmods/coop/deadmansstand.stormmod
// L12163
MaxF(0.0, libUIUI_gf_HeroesGameTime())
# mods/heroesbrawlmods/brawlmapmods/lunarfestival.stormmod
// L1511
MaxF((libLNYF_gv_movement.lv_speed[autoE34AC8EB_var] - 1.0), 4.0)
// L1512
MaxF((libLNYF_gv_movement.lv_speed[autoE34AC8EB_var] - 1.0), 4.0)
// L1513
MaxF((libLNYF_gv_movement.lv_speed[autoE34AC8EB_var] - 1.0), 4.0)
# mods/heroesdata.stormmod
// L2245
MaxF(libAIAI_gv_aIGateNearbyRange, (lv_offsetFromEdge + (0.5 * lv_originalDistance)))
# mods/heroesdata.stormmod
// L25961
MaxF(lv_newCooldownAmount, 0.1)
# mods/heroesdata.stormmod
// L6662
MaxF((lp_initialRespawnTime - libGame_gv_heroDeathRespawnCueSoundTiming), 0.0625)
// L6803
MaxF((lp_newRespawnTimerDuration - libGame_gv_heroDeathRespawnCueSoundTiming), 0.0625)
# mods/heroesdata.stormmod
// L1707
MaxF(7.0, (lv_deathTime / 2.0))
// L1710
MaxF(7.0, (lv_deathTime / 2.0))
# mods/heroesdata.stormmod
— StartingExperienceLib.galaxy
// L444
MaxF(PlayerGetPropertyFixed(lp_player, c_playerPropDamageTakenTime), PlayerGetPropertyFixed(lp_player, c_playerPropDamageDealtTime))
# mods/heroesdata.stormmod
// L8131
MaxF((TimerGetRemaining(libGame_gv_jungleWatchTowerStartTimer)-lv_requestedTimeChange*60), 0.0625)
// L8136
MaxF((TimerGetRemaining(libGame_gv_xPTrickleStartTimer)-lv_requestedTimeChange*60), 0.0625)
# mods/heroesmapmods/battlegroundmapmods/braxisholdout.stormmod
// L2946
MaxF(libSCHO_gv_mMHO_TotalZergHP[libGame_gv_teamOrderIndex_C], libSCHO_gv_mMHO_TotalZergHP[libGame_gv_teamChaosIndex_C])
// L2947
MaxF(libSCHO_gv_mMHO_TotalZergHP[libGame_gv_teamOrderIndex_C], libSCHO_gv_mMHO_TotalZergHP[libGame_gv_teamChaosIndex_C])
# mods/missionpacks/campaigncommon.sc2mod
// L91
MaxF(PlayerGetPropertyFixed(lp_player, c_playerPropDamageDealtTime), PlayerGetPropertyFixed(lp_player, c_playerPropDamageTakenTime))
# mods/novastoryassets.sc2mod
// L4485
MaxF((1-(lv_distance/50)), 0.0)
// L4485
MaxF((1-(lv_distance/50)), 0.0)
# mods/starcoop/starcoop.sc2mod
// L780
MaxF(0.0, 1.5)
// L1555
MaxF(0.5, UnitTypeGetProperty(UnitGetType(lv_indexGroundUnit), c_unitPropSuppliesUsed))
// L1896
MaxF(0.5, UnitTypeGetProperty(UnitGetType(lv_dropUnit), c_unitPropSuppliesUsed))
// L3756
MaxF(lp_thinkPeriod, 0.5)
// L5480
MaxF((lv_baseenergyregen + (libCOMI_gv_cM_Mengsk_EnergyRegenRoyalGuard + libCOMI_gv_cM_Mengsk_EnergyRegenTrooper)), 0.01)
// L6546
MaxF(lv_cooldownTime, 10.0)
// L9194
MaxF(PlayerGetPropertyFixed(lp_player, c_playerPropDamageDealtTime), PlayerGetPropertyFixed(lp_player, c_playerPropDamageTakenTime))
// L10389
MaxF(lv_minimumrevivedelay, TimerGetRemaining(lv_remindertimer))
// L22167
MaxF(Round((lv_xp / lv_veterancount)), lv_minimumearnedxp)
// L25323
MaxF((1-(lv_distance/50)), 0.0)
# mods/starcoop/starcoop.sc2mod
// L5069
MaxF(lv_remainingpercentage, 0.0)
// L12907
MaxF(libCOMU_gv_cT_SharedSupplyIndividual[lv_indexPlayer], 1.0)
# mods/starcoop/starcoop.sc2mod
// L5986
MaxF(libNtve_gf_WidthOfRegion(RegionPlayableMap()), libNtve_gf_HeightOfRegion(RegionPlayableMap()))
# mods/voidprologue.sc2mod
// L3382
MaxF(PlayerGetPropertyFixed(lp_player, c_playerPropDamageDealtTime), PlayerGetPropertyFixed(lp_player, c_playerPropDamageTakenTime))
# mods/warcoop/warclassicsystem.sc2mod
// L39
MaxF(UserDataGetFixed("MiscData", "Misc", "Creep - Max Camp Radius", 1), 0.0625)