mirror of
https://github.com/python/cpython.git
synced 2025-12-08 18:32:16 +00:00
__delta(): Use augmented assignments.
This commit is contained in:
parent
6c50ae0801
commit
b4d8612f2b
1 changed files with 6 additions and 6 deletions
|
|
@ -210,17 +210,17 @@ class DetailsViewer:
|
||||||
red, green, blue = self.__red, self.__green, self.__blue
|
red, green, blue = self.__red, self.__green, self.__blue
|
||||||
elif atbound == WRAP or (atbound == RATIO and len(tie) < 2):
|
elif atbound == WRAP or (atbound == RATIO and len(tie) < 2):
|
||||||
if red < 0:
|
if red < 0:
|
||||||
red = red + 256
|
red += 256
|
||||||
if green < 0:
|
if green < 0:
|
||||||
green = green + 256
|
green += 256
|
||||||
if blue < 0:
|
if blue < 0:
|
||||||
blue = blue + 256
|
blue += 256
|
||||||
if red > 255:
|
if red > 255:
|
||||||
red = red - 256
|
red -= 256
|
||||||
if green > 255:
|
if green > 255:
|
||||||
green = green - 256
|
green -= 256
|
||||||
if blue > 255:
|
if blue > 255:
|
||||||
blue = blue - 256
|
blue -= 256
|
||||||
elif atbound == RATIO:
|
elif atbound == RATIO:
|
||||||
# for when 2 or 3 colors are tied together
|
# for when 2 or 3 colors are tied together
|
||||||
dir = 0
|
dir = 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue