Assume A > 0 and B > 0 are two integers, ceil((double)A / B) can be written as (A + B - 1) / B.
A > 0
B > 0
ceil((double)A / B)
(A + B - 1) / B
Last updated 3 years ago