# Floor (Integer)
Grammar — Floor(x)
Flags —Native
|Function
Returns the largest value less than or equal to the specified number.
# Arguments
fixed
— Value
Returns — int
native int FloorI(fixed x);
# Related
Category: Math / Arithmetic
- Absolute Value (Integer) —
int
— AbsI - Absolute Value (Real) —
fixed
— AbsF - Arithmetic (Integer)
- Bitwise Arithmetic (Integer)
- Arithmetic (Real)
- Arithmetic Multiple (Integer)
- Bitwise Arithmetic Multiple (Integer)
- Arithmetic Multiple (Real)
- Ceiling (Integer) —
int
— CeilingI - Ceiling (Real) —
fixed
— Ceiling - Clamp (Integer) —
int
— libNtve_gf_ArithmeticIntClamp - Clamp (Real) —
fixed
— libNtve_gf_ArithmeticRealClamp - Cycle
- Floor (Integer) —
int
— FloorI - Floor (Real) —
fixed
— Floor - Log2 (Integer) —
int
— Log2I - Log2 (Real) —
fixed
— Log2 - Log (Real) —
fixed
— libNtve_gf_Log - Modulo (Integer) —
int
— ModI - Modulo (Real) —
fixed
— ModF - Power (Integer) —
int
— PowI - Power (Real) —
fixed
— Pow - Round (Integer) —
int
— RoundI - Round (Real) —
fixed
— Round - Pow2 (Integer) —
int
— Pow2I - Pow2 (Real) —
fixed
— Pow2 - Square Root (Integer) —
int
— SquareRootI - Square Root (Real) —
fixed
— SquareRoot - Trunc (Integer) —
int
— TruncI - Trunc (Real) —
fixed
— Trunc
# Examples
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zhybrid03.sc2map/MapScript.galaxy:1587
lv_arrowPingDistance = DistanceBetweenPoints(UnitGetPosition(gv_kerrigan), UnitGetPosition(gv_kerrigan22));
lv_angle = AngleBetweenPoints(UnitGetPosition(gv_kerrigan), UnitGetPosition(gv_kerrigan22));
lv_numberOfArrowPings = FloorI((lv_arrowPingDistance / 16.0));
if ((lv_numberOfArrowPings <= 0)) {
lv_numberOfArrowPings = 1;
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zhybrid03.sc2map/MapScript.galaxy:1615
lv_arrowPingDistance = DistanceBetweenPoints(UnitGetPosition(gv_kerrigan2), UnitGetPosition(gv_kerrigan22));
lv_angle = AngleBetweenPoints(UnitGetPosition(gv_kerrigan2), UnitGetPosition(gv_kerrigan22));
lv_numberOfArrowPings = FloorI((lv_arrowPingDistance / 16.0));
if ((lv_numberOfArrowPings <= 0)) {
lv_numberOfArrowPings = 1;
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid03.sc2map — MapScript.galaxy:1587
lv_arrowPingDistance = DistanceBetweenPoints(UnitGetPosition(gv_kerrigan), UnitGetPosition(gv_kerrigan22));
lv_angle = AngleBetweenPoints(UnitGetPosition(gv_kerrigan), UnitGetPosition(gv_kerrigan22));
lv_numberOfArrowPings = FloorI((lv_arrowPingDistance / 16.0));
if ((lv_numberOfArrowPings <= 0)) {
lv_numberOfArrowPings = 1;
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid03.sc2map — MapScript.galaxy:1615
lv_arrowPingDistance = DistanceBetweenPoints(UnitGetPosition(gv_kerrigan2), UnitGetPosition(gv_kerrigan22));
lv_angle = AngleBetweenPoints(UnitGetPosition(gv_kerrigan2), UnitGetPosition(gv_kerrigan22));
lv_numberOfArrowPings = FloorI((lv_arrowPingDistance / 16.0));
if ((lv_numberOfArrowPings <= 0)) {
lv_numberOfArrowPings = 1;
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/SupportLib.galaxy:1832
// Implementation
UnitBehaviorRemove(lp_unit, lp_behavior, 1000);
lv_count = FloorI((libGame_gv_scalingTicks * lp_rate));
UnitBehaviorAdd(lp_unit, lp_behavior, lp_unit, lv_count);
TextExpressionSetToken("Param/Expression/lib_Sprt_76BB2D86", "A", IntToText(lv_count));
mods/warcoop/warmeleeai.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:135
return AIWaveTargetPlayer(pgMelee);
}
creep=GetCreepCamp(player,0,FloorI(CR*0.8),GAw3_PlayerAllowAirCreep(player));
if(creep!=null){
DebugAI("Attacking Creep");