mirror of
https://github.com/mt-mods/mail.git
synced 2025-04-30 08:21:44 -04:00
Round numbers to avoid eventual float in string.format
This commit is contained in:
parent
0b3497eb2f
commit
4240f4eb39
1 changed files with 3 additions and 3 deletions
|
@ -32,9 +32,9 @@ local function rgbColorsMix(colors)
|
|||
G = G + c.g
|
||||
B = B + c.b
|
||||
end
|
||||
R = R / #colors
|
||||
G = G / #colors
|
||||
B = B / #colors
|
||||
R = math.floor(R / #colors + 0.5)
|
||||
G = math.floor(G / #colors + 0.5)
|
||||
B = math.floor(B / #colors + 0.5)
|
||||
return {r=R,g=G,b=B}
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue