# Ceiling (Integer)

Grammar — Ceiling(x)
FlagsNative | Function

Returns the smallest value that is not less than the argument.

# Arguments

  • fixed — Value

Returns — int

native int CeilingI(fixed x);

Category: Math / Arithmetic

# Examples

mods/heroesbrawlmods/brawlmapmods/coop/escapefrombraxis.stormmodbase.stormdata/LibPEB1.galaxy:11330

        lv_time = libUIUI_gf_HeroesGameTime();
        if ((lv_time < libPEB1_gv_goldTime_C)) {
            libNtve_gf_SetDialogItemText(libPESC_gv_pVEBrawlTopBar.lv_timerLabelGold, TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), CeilingI((libPEB1_gv_goldTime_C - TimerGetElapsed(libGame_gv_gameTimer)))), PlayerGroupAll());
            DialogControlSetSize(libPESC_gv_pVEBrawlTopBar.lv_timerBarGold, PlayerGroupAll(), FixedToInt((((libPEB1_gv_goldTime_C - TimerGetElapsed(libGame_gv_gameTimer)) * lv_goldBarWidth_C) / libPEB1_gv_goldTime_C)), 14);
        }

mods/heroesbrawlmods/brawlmapmods/coop/escapefrombraxis.stormmodbase.stormdata/LibPEB1.galaxy:11344

        }
        else if ((lv_time > libPEB1_gv_goldTime_C) && (lv_time < libPEB1_gv_silverTime_C) && (lv_missionTimerState == 1)) {
            libNtve_gf_SetDialogItemText(libPESC_gv_pVEBrawlTopBar.lv_timerLabelSilver, TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), CeilingI((libPEB1_gv_silverTime_C - TimerGetElapsed(libGame_gv_gameTimer)))), PlayerGroupAll());
            DialogControlSetSize(libPESC_gv_pVEBrawlTopBar.lv_timerBarSilver, PlayerGroupAll(), FixedToInt((((libPEB1_gv_silverTime_C - TimerGetElapsed(libGame_gv_gameTimer)) * lv_silverBarWidth_C) / (libPEB1_gv_silverTime_C - libPEB1_gv_goldTime_C))), 14);
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:3607

    if ((lp_method == libCOMI_ge_UnitBuffMultiplierMethod_Exponential) && (lp_multiplierAmount != 1.0)) {
        lv_multiplierStack = libNtve_gf_Log(lp_multiplierAmount, lp_baseValue);
        CatalogFieldValueSet(c_gameCatalogBehavior, lp_behavior, "MinPoints", UnitGetOwner(lp_unit), IntToString(CeilingI(lv_multiplierStack)));
        UnitBehaviorAddPlayer(lp_unit, lp_behavior, UnitGetOwner(lp_unit), 1);
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:3612

    else if ((lp_method == libCOMI_ge_UnitBuffMultiplierMethod_Linear) && (lp_multiplierAmount != 0.0)) {
        lv_multiplierStack = (lp_multiplierAmount / lp_baseValue);
        CatalogFieldValueSet(c_gameCatalogBehavior, lp_behavior, "MinPoints", UnitGetOwner(lp_unit), IntToString(CeilingI(lv_multiplierStack)));
        UnitBehaviorAddPlayer(lp_unit, lp_behavior, UnitGetOwner(lp_unit), 1);
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:5734

            for ( ; ( (auto063B4A4F_ai >= 0 && lv_itResourceType <= auto063B4A4F_ae) || (auto063B4A4F_ai < 0 && lv_itResourceType >= auto063B4A4F_ae) ) ; lv_itResourceType += auto063B4A4F_ai ) {
                lv_default = libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogAbil, lv_itResearch, "InfoArray[" + IntToString(lv_itResearchCmd) + "].Resource[" + IntToString(lv_itResourceType) + "]", c_playerAny);
                libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogAbil, lv_itResearch, "InfoArray[" + IntToString(lv_itResearchCmd) + "].Resource[" + IntToString(lv_itResourceType) + "]", lp_player, CeilingI((lv_default*lv_changedFactor)));
            }
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:15287


            lv_expectedDrop = (libNtve_gf_DifficultyValueFixed(lv_biomassCasualMultiplier, lv_biomassNormalMultiplier, lv_biomassHardMultiplier, lv_biomassBrutalMultiplier) * lv_biomassBaseAmount * lv_biomassToxicNestMultiplier);
            lv_biomassUnitCount = CeilingI(lv_expectedDrop);
            lv_fractionChance = (lv_expectedDrop - lv_biomassUnitCount);
            if ((RandomFixed(0.0, 1.0) <= lv_fractionChance)) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:24011

    for ( ; autoF06ACDE6_i <= CatalogFieldValueCount(c_gameCatalogUpgrade,autoF06ACDE6_entry,autoF06ACDE6_fieldPath,autoF06ACDE6_player)-1 ; autoF06ACDE6_i += 1 ) {
        lv_itUnit = CatalogFieldValueGet(c_gameCatalogUpgrade,autoF06ACDE6_entry,autoF06ACDE6_fieldPath+"["+IntToString(autoF06ACDE6_i)+"]",autoF06ACDE6_player);
        CatalogFieldValueSet(c_gameCatalogUnit, lv_itUnit, "CostResource[" + IntToString(0) + "]", lv_player, IntToString(CeilingI((CatalogFieldValueGetAsInt(c_gameCatalogUnit, lv_itUnit, "CostResource[" + IntToString(0) + "]", c_playerAny)*lv_costMutiplayer))));
    }
    TriggerEnable(TriggerGetCurrent(), false);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:26239

    }

    AchievementTermQuantityAdd(lv_healingPlayer, "CommanderTychusHeal", CeilingI(EventUnitHealAmount()));
    return true;
}

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:1830


    }
    libCOUI_gv_cU_CustomMutatorPageCount = CeilingI((libCOUI_gv_cU_CustomMutatorItemCount / libCOUI_gv_cUC_CustomMutatorItemsPerPage));
    libCOUI_gv_cU_CustomMutatorPageCount = CeilingI((IntToFixed(libCOUI_gv_cU_CustomMutatorItemCount) / IntToFixed(libCOUI_gv_cUC_CustomMutatorItemsPerPage)));
    auto548D1FF5_g = libCOOC_gf_HumanPlayers();

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:1831

    }
    libCOUI_gv_cU_CustomMutatorPageCount = CeilingI((libCOUI_gv_cU_CustomMutatorItemCount / libCOUI_gv_cUC_CustomMutatorItemsPerPage));
    libCOUI_gv_cU_CustomMutatorPageCount = CeilingI((IntToFixed(libCOUI_gv_cU_CustomMutatorItemCount) / IntToFixed(libCOUI_gv_cUC_CustomMutatorItemsPerPage)));
    auto548D1FF5_g = libCOOC_gf_HumanPlayers();
    lv_indexPlayer = -1;