# Floor (Real)
Grammar — Floor(x)
Flags —Native|Function
Returns the largest value less than or equal to the specified number.
# Arguments
- fixed— Value
Returns — fixed
native fixed Floor(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/void.sc2campaign — base.sc2maps/maps/campaign/void/pshakuras02.sc2map/MapScript.galaxy:1424
            gv_zergOnShakuras += lv_bonusTickAmount;
            TextExpressionSetToken("Param/Expression/37DA2CCF", "HUNDREDMILLIONS", FixedToText((gv_zergOnShakuras / 100.0), 3));
            TextExpressionSetToken("Param/Expression/37DA2CCF", "BILLIONSINT", IntToText(FixedToInt(Floor((gv_zergOnShakuras / 1000.0)))));
            TextExpressionSetToken("Param/Expression/37DA2CCF", "BILLIONS", FixedToText((gv_zergOnShakuras / 1000.0), 3));
            libNtve_gf_SetDialogItemText(gv_zergCounterLabel, TextExpressionAssemble("Param/Expression/37DA2CCF"), PlayerGroupAll());
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pshakuras02.sc2map/MapScript.galaxy:3467
    VictoryPanelAddTrackedStatistic("StructuresLostCount");
    TextExpressionSetToken("Param/Expression/D7D246B0", "HUNDREDMILLIONS", FixedToText((gv_zergOnShakuras / 100.0), 3));
    TextExpressionSetToken("Param/Expression/D7D246B0", "BILLIONSINT", IntToText(FixedToInt(Floor((gv_zergOnShakuras / 1000.0)))));
    TextExpressionSetToken("Param/Expression/D7D246B0", "BILLIONS", FixedToText((gv_zergOnShakuras / 1000.0), 3));
    VictoryPanelAddCustomStatisticLine(StringExternal("Param/Value/2A7C79E9"), TextExpressionAssemble("Param/Expression/D7D246B0"));
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pshakuras02.sc2map — MapScript.galaxy:1424
            gv_zergOnShakuras += lv_bonusTickAmount;
            TextExpressionSetToken("Param/Expression/37DA2CCF", "HUNDREDMILLIONS", FixedToText((gv_zergOnShakuras / 100.0), 3));
            TextExpressionSetToken("Param/Expression/37DA2CCF", "BILLIONSINT", IntToText(FixedToInt(Floor((gv_zergOnShakuras / 1000.0)))));
            TextExpressionSetToken("Param/Expression/37DA2CCF", "BILLIONS", FixedToText((gv_zergOnShakuras / 1000.0), 3));
            libNtve_gf_SetDialogItemText(gv_zergCounterLabel, TextExpressionAssemble("Param/Expression/37DA2CCF"), PlayerGroupAll());
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pshakuras02.sc2map — MapScript.galaxy:3467
    VictoryPanelAddTrackedStatistic("StructuresLostCount");
    TextExpressionSetToken("Param/Expression/D7D246B0", "HUNDREDMILLIONS", FixedToText((gv_zergOnShakuras / 100.0), 3));
    TextExpressionSetToken("Param/Expression/D7D246B0", "BILLIONSINT", IntToText(FixedToInt(Floor((gv_zergOnShakuras / 1000.0)))));
    TextExpressionSetToken("Param/Expression/D7D246B0", "BILLIONS", FixedToText((gv_zergOnShakuras / 1000.0), 3));
    VictoryPanelAddCustomStatisticLine(StringExternal("Param/Value/2A7C79E9"), TextExpressionAssemble("Param/Expression/D7D246B0"));
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:1482
                }
                else {
                    libVoiC_gf_ZS_SetObjectiveProgressData(lp_missionObjective, FixedToInt(Floor((libVoiC_gf_MissionObjectiveItemCount(lp_missionObjective) / 2.0))));
                    libVoiC_gv_pC_DebugProgressObjectiveRoundUp = true;
                    libVCMI_gf_ZS_SetMissionObjectiveState(lp_missionObjective, libVoiC_ge_MissionObjectiveState_Available);
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:1059
    lv_width = (lp_maxAmount - lp_minAmount);
    lv_OffsetValue = (lp_value - lp_minAmount);
    return ((lv_OffsetValue - (Floor((lv_OffsetValue / lv_width)) * lv_width)) + lp_minAmount);
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:4994
    // Implementation
    lv_energyFloored = Floor(UnitGetPropertyFixed(libVCUI_gv_pU_GPUnit, c_unitPropEnergy, c_unitPropCurrent));
    if ((lv_energyFloored == libVCUI_gv_pU_GPLastEnergyUpdate)) {
        return ;
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:1939
        if ((lv_effectAmount <= 0)) {
            if ((lv_killingBlowFound == false) && (lv_effectTypePresetAttempted == c_effectAmountDamageAttempted) && (lv_effectAmountAttempted > lv_effectAmountShielded) && (lv_itEffectHistoryEntry == 1)) {
                lv_effectAmount = MaxI(FixedToInt(Floor(UnitGetPropertyFixed(lv_deadHeroUnit, c_unitPropLife, c_unitPropCurrent))), PlayerScoreValueGetAsInt(lp_deadPlayer, "DeadHeroLastKnownHealth"));
                lv_effectKill = true;
                if ((lv_effectAmount == libGame_gv_deathRecap_DeathData[lp_deadPlayer].lv_deadHeroMaxHealth)) {
mods/heromods/zarya.stormmod — base.stormdata/LibHZAR.galaxy:164
    lv_newShieldAmount = UnitGetPropertyFixed(lv_zaryaUnit, c_unitPropEnergy, c_unitPropCurrent);
    lv_newShieldAmount += 0.5;
    lv_newShieldAmount = Floor(lv_newShieldAmount);
    lv_conversionRate = CatalogFieldValueGetAsFixed(c_gameCatalogBehavior, "ZaryaPainIsTemporary", "DamageResponse.ModifyLimit", lv_localPlayer);
    lv_newShieldAmount *= lv_conversionRate;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:3513
    lv_width = (lp_maxAmount - lp_minAmount);
    lv_OffsetValue = (lp_value - lp_minAmount);
    return ((lv_OffsetValue - (Floor((lv_OffsetValue / lv_width)) * lv_width)) + lp_minAmount);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOUI.galaxy:4682
    // Implementation
    lv_energyFloored = Floor(UnitGetPropertyFixed(libCOUI_gv_cU_GPUnit[lp_player], c_unitPropEnergy, c_unitPropCurrent));
    if ((lv_energyFloored == libCOUI_gv_cU_GPLastEnergyUpdate[lp_player])) {
        return ;