feat: add clamp_to_byte at the end of calculator
This commit is contained in:
parent
f5363514bf
commit
65ce7f1994
@ -6,3 +6,7 @@ def add(left: int, right: int) -> int:
|
||||
|
||||
def subtract(left: int, right: int) -> int:
|
||||
return left - right
|
||||
|
||||
|
||||
def clamp_to_byte(value: int) -> int:
|
||||
return max(0, min(255, value))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user