# Floor (Integer)

Grammar — Floor(x)
FlagsNative | Function

Returns the largest value less than or equal to the specified number.

# Arguments

  • fixed — Value

Returns — int

native int FloorI(fixed x);

Category: Math / Arithmetic

# Examples

campaigns/swarm.sc2campaignbase.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.sc2campaignbase.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.sc2mapMapScript.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.sc2mapMapScript.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.stormmodbase.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.sc2modbase.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");