Advertisement
here2share

# wrap_255.py

Feb 23rd, 2025
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.11 KB | None | 0 0
  1. # wrap_255.py
  2.  
  3. def wrap_255(n):
  4.     period = 512
  5.     n_mod = n % period
  6.     return int(255 - abs(n_mod - 255))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement