Skip to content

Commit

Permalink
update junkdrawer.clamp type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
tybug committed Feb 8, 2024
1 parent 4d71563 commit f9dec08
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def __check_index(self, i: int) -> int:
return i


def clamp(lower: int, value: int, upper: int) -> int:
def clamp(lower: float, value: float, upper: float) -> float:
"""Given a value and lower/upper bounds, 'clamp' the value so that
it satisfies lower <= value <= upper."""
return max(lower, min(value, upper))
Expand Down

0 comments on commit f9dec08

Please sign in to comment.