# Absolute Value (Real)
Grammar — Abs(value)
Flags —Native
|Function
Returns the value of the real without regard to the sign of the real.
# Arguments
fixed
— Value
Returns — fixed
native fixed AbsF(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
# campaigns/liberty.sc2campaign
// L6098
AbsF((PointGetY(lv_pos) - PointGetY(gv_bGTarget)))
// L6325
AbsF((UnitGetFacing(lv_plane) - AngleBetweenPoints(lv_posCurrent, UnitGetPosition(gv_viking))))
// L6860
AbsF(lv_angleInterval)
// L6862
AbsF((lv_speed / 0.0625))
// L35
AbsF((PointGetX(RegionGetBoundsMax(lp_circle)) - PointGetX(RegionGetBoundsMin(lp_circle))))
// L15215
AbsF((lv_offsetTarget - lv_offsetOriginal))
// L6098
AbsF((PointGetY(lv_pos) - PointGetY(gv_bGTarget)))
// L6325
AbsF((UnitGetFacing(lv_plane) - AngleBetweenPoints(lv_posCurrent, UnitGetPosition(gv_viking))))
// L6860
AbsF(lv_angleInterval)
// L6862
AbsF((lv_speed / 0.0625))
// L35
AbsF((PointGetX(RegionGetBoundsMax(lp_circle)) - PointGetX(RegionGetBoundsMin(lp_circle))))
// L15215
AbsF((lv_offsetTarget - lv_offsetOriginal))
# campaigns/libertystory.sc2campaign
// L1680
AbsF(lp_grid)
// L1713
AbsF(lp_value)
# mods/core.sc2mod
// L4171
AbsF((PointGetX(RegionGetBoundsMax(lp_region)) - PointGetX(RegionGetBoundsMin(lp_region))))
// L4177
AbsF((PointGetY(RegionGetBoundsMax(lp_region)) - PointGetY(RegionGetBoundsMin(lp_region))))
// L3470
AbsF((PointGetX(RegionGetBoundsMax(lp_region)) - PointGetX(RegionGetBoundsMin(lp_region))))
// L3476
AbsF((PointGetY(RegionGetBoundsMax(lp_region)) - PointGetY(RegionGetBoundsMin(lp_region))))
# mods/heroesbrawlmods/brawlmapmods/coop/pvebrawlmod.stormmod
// L1476
AbsF(DistanceBetweenPoints(lv_ptPre, lv_ptUnit))
// L1477
AbsF(DistanceBetweenPoints(lv_ptNext, lv_ptUnit))
// L1506
AbsF((lv_distanceUnitPre * Sin((lv_angelUnit - lv_angelLane))))
// L1508
AbsF((lv_distanceUnitPre * Cos((lv_angelUnit - lv_angelLane))))
# mods/heroesbrawlmods/brawlmapmods/coop/pvemod.stormmod
// L147
AbsF(DistanceBetweenPoints(lv_ptPre, lv_ptUnit))
// L148
AbsF(DistanceBetweenPoints(lv_ptNext, lv_ptUnit))
// L177
AbsF((lv_distanceUnitPre * Sin((lv_angelUnit - lv_angelLane))))
// L179
AbsF((lv_distanceUnitPre * Cos((lv_angelUnit - lv_angelLane))))
# mods/heroesbrawlmods/brawlmapmods/lunarfestival.stormmod
// L1531
AbsF(libLNYF_gv_movement.lv_facing_Current[autoE34AC8EB_var])
// L1531
AbsF(libLNYF_gv_movement.lv_facing_Old[autoE34AC8EB_var])
// L1532
AbsF(libLNYF_gv_movement.lv_facing_Current[autoE34AC8EB_var])
// L1532
AbsF(libLNYF_gv_movement.lv_facing_Old[autoE34AC8EB_var])
// L1534
AbsF(libLNYF_gv_movement.lv_facing_Old[autoE34AC8EB_var])
// L1534
AbsF(libLNYF_gv_movement.lv_facing_Current[autoE34AC8EB_var])
// L1535
AbsF(libLNYF_gv_movement.lv_facing_Old[autoE34AC8EB_var])
// L1535
AbsF(libLNYF_gv_movement.lv_facing_Current[autoE34AC8EB_var])
// L1537
AbsF(libLNYF_gv_movement.lv_facing_Old[autoE34AC8EB_var])
// L1537
AbsF(libLNYF_gv_movement.lv_facing_Current[autoE34AC8EB_var])
# mods/heroesdata.stormmod
// L2140
AbsF(Trunc(lv_levelDifferenceReal))
// L2142
AbsF(ModF(lv_levelDifferenceReal, 1.0))
// L2842
AbsF((lp_angle1 - lp_angle2))
// L2844
AbsF((lv_diff - 360.0))
# mods/heromods/alexstrasza.stormmod
// L110
AbsF((lv_targetHealthPercent - lv_alexstraszaHealthPercent))
# mods/heromods/imperius.stormmod
// L129
AbsF((lv_imperiusUnitFacing360 - lv_relativeAngle360))
// L129
AbsF(((lv_imperiusUnitFacing360 + lv_relativeAngle360) - 360.0))
# mods/heromods/malthael.stormmod
// L225
AbsF(libHMTH_gv_heroMalthaelTouchOfDeathHealingPreventScale)
// L226
AbsF(libHMTH_gv_heroMalthaelTouchOfDeathHealingPreventScale)
# mods/heromods/thefirelords.stormmod
// L332
AbsF(UnitGetPropertyFixed(EventUnit(), c_unitPropLifeRegen, c_unitPropCurrent))
// L334
AbsF(UnitGetPropertyFixed(EventUnit(), c_unitPropLifeRegen, c_unitPropCurrent))
# mods/novastoryassets.sc2mod
// L4403
AbsF((UnitGetFacing(gv_s2_Davis) - AngleBetweenPoints(UnitGetPosition(gv_s2_Davis), UnitGetPosition(gv_nova))))
// L4687
AbsF((PointGetFacing(PointFromId(599)) - UnitGetFacing(gv_xanthos)))
// L4403
AbsF((UnitGetFacing(gv_s2_Davis) - AngleBetweenPoints(UnitGetPosition(gv_s2_Davis), UnitGetPosition(gv_nova))))
// L4687
AbsF((PointGetFacing(PointFromId(599)) - UnitGetFacing(gv_xanthos)))
# mods/starcoop/starcoop.sc2mod
// L17319
AbsF(libCOMI_gv_cM_DehakaEatReviveTimerAdjustment)
# mods/warcoop/legends/gromhellscream.sc2mod
// L47
AbsF((lv_startingclifflevel - PointPathingCliffLevel(lv_currentpoint)))