6 lines
226 B
Python
6 lines
226 B
Python
from .errors import ValueOutOfBoundsError
|
|
|
|
def check_bounds(bounds: tuple[float, float] | tuple[int, int], value: float | int):
|
|
if value < bounds[0] or value > bounds[1]:
|
|
raise ValueOutOfBoundsError(bounds, value)
|