# Ceiling (Real)

Grammar — Ceiling(x)
FlagsNative | Function

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

# Arguments

  • fixed — Value

Returns — fixed

native fixed Ceiling(fixed x);

Category: Math / Arithmetic

# Examples

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignLib.galaxy:1477

            else if (autoB5021924_val == libVoiC_ge_DebugProgressBonusObjectiveAmount_HalfObjectives) {
                if ((libVoiC_gv_pC_DebugProgressObjectiveRoundUp == true)) {
                    libVoiC_gf_ZS_SetObjectiveProgressData(lp_missionObjective, FixedToInt(Ceiling((libVoiC_gf_MissionObjectiveItemCount(lp_missionObjective) / 2.0))));
                    libVoiC_gv_pC_DebugProgressObjectiveRoundUp = false;
                    libVCMI_gf_ZS_SetMissionObjectiveState(lp_missionObjective, libVoiC_ge_MissionObjectiveState_Available);

mods/heromods/zarya.stormmodbase.stormdata/LibHZAR.galaxy:967

    while ((UnitIsAlive(lv_zarya) == true)) {
        lv_newBoostAmount = UnitGetPropertyFixed(EventUnit(), c_unitPropEnergy, c_unitPropCurrent);
        lv_newBoostAmount = Ceiling(lv_newBoostAmount);
        if (((lv_newBoostAmount < libHZAR_gv_heroZaryaTintStage1EnergyMax) && (libHZAR_gv_heroZaryaCurrentTintStage[lv_zaryaPlayer] != 1))) {
            ActorSend(lv_zaryaActor, "Signal EnergyStageA");

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

    CatalogFieldValueSet(c_gameCatalogUnit, "RoachBurrowed", "LifeMax", lp_player, IntToString(FixedToInt(lv_healthNew)));
    CatalogFieldValueSet(c_gameCatalogUnit, "RoachBurrowed", "LifeStart", lp_player, IntToString(FixedToInt(lv_healthNew)));
    lv_damageNew = Ceiling((lv_damageStarting+(lv_upgradeCount*lv_damagePerPoint)));
    CatalogFieldValueSet(c_gameCatalogEffect, "AcidSalivaU", "Amount", lp_player, IntToString(FixedToInt(lv_damageNew)));
    CatalogFieldValueSet(c_gameCatalogEffect, "RoachUMelee", "Amount", lp_player, IntToString(FixedToInt(lv_damageNew)));

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


    lv_essenceBaseAmount = 1;
    lv_essenceUnitCount = libNtve_gf_DifficultyValueInt((lv_essenceBaseAmount * lv_essenceCasualMultiplier), (lv_essenceBaseAmount * lv_essenceNormalMultiplier), FixedToInt(Ceiling((lv_essenceBaseAmount * lv_essenceHardMultiplier))), (lv_essenceBaseAmount * lv_essenceBrutalMultiplier));
    if ((lv_essenceUnitCount > 0)) {
        libCOMI_gv_cM_DebugDehakaEssenceDroppedNormal += lv_essenceUnitCount;

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

            }
            if ((((TechTreeUpgradeCount(lv_indexPlayer, "AbathurToxicNestIcreasedBiomass", c_techCountCompleteOnly) == 1) && (UnitHasBehavior2(EventUnit(), "ToxicNestVirulentNest") == true)) || ((TechTreeUpgradeCount(lv_indexPlayer, "MasteryAbathurDoubleBiomass", c_techCountCompleteOnly) > 0) && (RandomFixed(0.0, 100.0) <= lv_doubleBiomassChance)))) {
                lv_biomassUnitCount = (libNtve_gf_DifficultyValueInt((lv_biomassBaseAmount * lv_biomassCasualMultiplier), (lv_biomassBaseAmount * lv_biomassNormalMultiplier), FixedToInt(Ceiling((lv_biomassBaseAmount * lv_biomassHardMultiplier))), (lv_biomassBaseAmount * lv_biomassBrutalMultiplier)) * lv_biomassToxicNestMultiplier);
            }
            else {

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

            }
            else {
                lv_biomassUnitCount = libNtve_gf_DifficultyValueInt((lv_biomassBaseAmount * lv_biomassCasualMultiplier), (lv_biomassBaseAmount * lv_biomassNormalMultiplier), FixedToInt(Ceiling((lv_biomassBaseAmount * lv_biomassHardMultiplier))), (lv_biomassBaseAmount * lv_biomassBrutalMultiplier));
            }
            if ((lv_biomassUnitCount > 0)) {

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

        lv_essenceBaseAmount = 12;
    }
    lv_essenceUnitCount = libNtve_gf_DifficultyValueInt((lv_essenceBaseAmount * lv_essenceCasualMultiplier), (lv_essenceBaseAmount * lv_essenceNormalMultiplier), FixedToInt(Ceiling((lv_essenceBaseAmount * lv_essenceHardMultiplier))), (lv_essenceBaseAmount * lv_essenceBrutalMultiplier));
    if ((lv_essenceUnitCount > 0)) {
        libCOMI_gv_cM_DebugDehakaEssenceDroppedNormal += lv_essenceUnitCount;

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:505

    }

    libNtve_gf_CreateUnitsWithDefaultFacing(MaxI(FixedToInt(Ceiling(UnitTypeGetProperty(UnitGetType(lp_killedUnit), c_unitPropSuppliesUsed))), 1), "KerriganInfestBroodling", 0, UnitGetOwner(lp_killedUnit), UnitGetPosition(lp_killedUnit));
    UnitGroupAddUnitGroup(libCOMU_gv_cT_OnDeathSpawns, UnitLastCreatedGroup());
    UnitGroupAddUnitGroup(lv_broodlingGroup, UnitLastCreatedGroup());

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:508

    UnitGroupAddUnitGroup(libCOMU_gv_cT_OnDeathSpawns, UnitLastCreatedGroup());
    UnitGroupAddUnitGroup(lv_broodlingGroup, UnitLastCreatedGroup());
    libCOMU_gv_cT_StatBroodlingsSpawned += MaxI(FixedToInt(Ceiling(UnitTypeGetProperty(UnitGetType(lp_killedUnit), c_unitPropSuppliesUsed))), 1);
    libCOMU_gf_CT_RegisterSpawnedUnitGroup(UnitLastCreatedGroup());
    AISetGroupScriptControlled(lv_broodlingGroup, false);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:528

    else {
        lv_owner = UnitGetOwner(lp_killedUnit);
        libNtve_gf_CreateUnitsWithDefaultFacing(MaxI(FixedToInt(Ceiling(UnitTypeGetProperty(UnitGetType(lp_killedUnit), c_unitPropSuppliesUsed))), 1), "InfestedCivilian", c_unitCreateIgnorePlacement, lv_owner, UnitGetPosition(lp_killedUnit));
        UnitGroupAddUnitGroup(libCOMU_gv_cT_OnDeathSpawns, UnitLastCreatedGroup());
        libCOMU_gf_CT_RegisterSpawnedUnitGroup(UnitLastCreatedGroup());

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:1177

        }
        else {
            lv_orderCost = FixedToInt(Ceiling((UnitGetPropertyFixed(lp_orderedUnit, c_unitPropSuppliesUsed, c_unitPropCurrent) * -1.0)));
        }
        if (((UnitGetType(lp_orderedUnit) == "Brutalisk") || (UnitGetType(lp_orderedUnit) == "HotSLeviathan"))) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:1904

    }

    lv_baseXP = FixedToInt(Ceiling((IntToFixed(libCOOC_gf_CC_MissionExperienceReward())*libCOOC_gf_CC_PlayerExperienceResultModifier(lp_result))));
    lv_objectiveXP = FixedToInt(Ceiling((IntToFixed(libCOOC_gf_MissionRewardTotalEarned2("Experience"))*libCOOC_gf_CC_PlayerExperienceResultModifier(lp_result))));
    if ((lp_result == c_gameOverDefeat)) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:1905


    lv_baseXP = FixedToInt(Ceiling((IntToFixed(libCOOC_gf_CC_MissionExperienceReward())*libCOOC_gf_CC_PlayerExperienceResultModifier(lp_result))));
    lv_objectiveXP = FixedToInt(Ceiling((IntToFixed(libCOOC_gf_MissionRewardTotalEarned2("Experience"))*libCOOC_gf_CC_PlayerExperienceResultModifier(lp_result))));
    if ((lp_result == c_gameOverDefeat)) {
        lv_baseXP = FixedToInt((lv_baseXP / 100.0));

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:1908

    if ((lp_result == c_gameOverDefeat)) {
        lv_baseXP = FixedToInt((lv_baseXP / 100.0));
        lv_baseXP = FixedToInt(Ceiling((IntToFixed(lv_baseXP)*libCOOC_gv_cC_PlayerExperienceEffortPct)));
        lv_objectiveXP = FixedToInt((lv_objectiveXP / 100.0));
        lv_objectiveXP = FixedToInt(Ceiling((IntToFixed(lv_objectiveXP)*libCOOC_gv_cC_PlayerExperienceEffortPct)));

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:1910

        lv_baseXP = FixedToInt(Ceiling((IntToFixed(lv_baseXP)*libCOOC_gv_cC_PlayerExperienceEffortPct)));
        lv_objectiveXP = FixedToInt((lv_objectiveXP / 100.0));
        lv_objectiveXP = FixedToInt(Ceiling((IntToFixed(lv_objectiveXP)*libCOOC_gv_cC_PlayerExperienceEffortPct)));
    }