mcfonts.number

Module Contents

nearest_ceiling(number: int, ceilings: collections.abc.Iterable[int]) int

Find the smallest number in ceilings that is greater than or equal to number.

Parameters:
number : int

The number to round up to the nearest ceiling.

ceilings : collections.abc.Iterable[int]

An iterable of int to compare with number.

Returns:

The nearest ceiling in ceilings.

Raises:

ValueError -- If no valid ceiling exists that is greater than or equal to number.

Return type:

int