initial app helpers completed - moving to make the default apps next.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
def clamp(num, min_value, max_value):
|
||||
return max(min(num, max_value), min_value)
|
||||
|
||||
|
||||
|
||||
def rgb_from_int(rgb):
|
||||
blue = rgb & 255
|
||||
green = (rgb >> 8) & 255
|
||||
red = (rgb >> 16) & 255
|
||||
return red, green, blue
|
||||
Reference in New Issue
Block a user