# Floor (Real)

Grammar — Floor(x)
FlagsNative | Function

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

# Arguments

  • fixed — Value

Returns — fixed

native fixed Floor(fixed x);

Category: Math / Arithmetic

# Examples

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