Returns num/denom, rounded toward positive infinity. Put another way, returns the smallest integral value that is greater than or equal to the exact (not rounded) fraction num/denom.
Declared in <folly/Math.h>
template<
typename N,
typename D>
constexpr
/* implementation-defined */
divCeil(
N num,
D denom);
This function undergoes the same integer promotion rules as a built-in operator, except that we don't allow bool -> int promotion. This function is undefined if denom == 0. It is also undefined if the result type T is a signed type, num is std::numeric_limits<T>::min(), and denom is equal to -1 after conversion to the result type.
num/denom, rounded toward positive infinity.
| Name | Description |
|---|---|
| num | The dividend. |
| denom | The divisor. |