floor

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

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

Return Value

Type: Integer

x rounded downward according to base.

Examples

assert(floor(8, 10) == 0);
assert(floor(32, 16) == 32);
assert(floor(101, 100) == 100);

Meta