ceil

Round x upward according to base, ie. returns the next integer larger or equal to x which is divisible by base.

Integer
ceil
pure nothrow
(
Integer
)
(
in Integer x
,
in Integer base
)
if (
isIntegral!Integer
)

Return Value

Type: Integer

x rounded upward according to base.

Examples

assert(ceil(8, 10) == 10);
assert(ceil(32, 16) == 32);
assert(ceil(101, 100) == 200);

Meta