Is there an integer division operator rounding up? To make it so:
1 / N = 1 2 / N = 1 ... N / N = 1 N + 1 / N = 2 N + 2 / N = 2 ... 2N / N = 2 2N + 1 / N = 3 ... Or how can this be implemented without using mathematics, only on embedded primitives and integer data types?
UPD: there is no built-in, then is it possible to simplify the following function:
int div_up(int x, int y) { return x / y + (x%y ? 1 : 0); }