7 May
2018
7 May
'18
1:19 p.m.
On Fri, 2018-05-04 at 18:01 +0300, Seppo Ingalsuo wrote:
+/* This is a divide function that returns ceil of the quotient.
- E.g. ceil_divide(9, 3) returns 3, ceil_divide(10, 3) returns 4.
- */
+int ceil_divide(int a, int b) +{
int c;
c = a / b;
if (c * b < a)
c++;
return c;
+}
This one should be static inline.
Liam