mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Added sanity check to compare
This commit is contained in:
parent
a59381d0bf
commit
2f05b83390
@ -64,10 +64,14 @@ def instructions(keys):
|
|||||||
|
|
||||||
fullmatch = percentages["common"]
|
fullmatch = percentages["common"]
|
||||||
partialmatch = percentages["more_self"] + percentages["more_other"]
|
partialmatch = percentages["more_self"] + percentages["more_other"]
|
||||||
|
|
||||||
match = fullmatch + (partialmatch)/2
|
match = fullmatch + (partialmatch)/2
|
||||||
pixel_fullmatch = fullmatch * 2.5
|
pixel_fullmatch = fullmatch * 2.5
|
||||||
pixel_partialmatch = (fullmatch+partialmatch) * 2.5
|
pixel_partialmatch = (fullmatch+partialmatch) * 2.5
|
||||||
|
|
||||||
|
match = min(match,100)
|
||||||
|
|
||||||
|
|
||||||
matchcolor = format(int(min(1,match/50)*255),"02x") * 2 + format(int(max(0,match/50-1)*255),"02x")
|
matchcolor = format(int(min(1,match/50)*255),"02x") * 2 + format(int(max(0,match/50-1)*255),"02x")
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user