Type alias Ceil<T>

Ceil<T>: ParseSignFloatNumber<T> extends infer Number extends SignFloatNumber
    ? TruncateSignFloatNumber<Number> extends infer TrucateNumber extends SignFloatNumber
        ? CompareSignNumbers<Number, TrucateNumber> extends 1
            ? StringifySignFloat<AddSignFloatNumber<TrucateNumber, SignFloatNumber<"+", FloatNumber<[1], []>>>>
            : StringifySignFloat<TrucateNumber>
        : never
    : never

Round a number up to the nearest integer

Type Parameters

  • T extends NumberLike

    The number to ceil

    type Example = Ceil<"3.14">
    

Generated using TypeDoc