I want to create a function which will function like this:
def ceil(i: int, max: int) -> int:
return max if i > max else i
I am wondering if it is possible to do this without using conditions.
I think it should be possible to do the function with simple math. But I can't figure out how.
I don't want to use any built in functions.