Created
February 17, 2021 15:39
-
-
Save BilHim/30eec1d1efbabeda7f643f68469ec174 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def truncate(x): | |
| '''makes sure returned value is between 0 and 255''' | |
| return min(255, max(0, x)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment