mirror of
https://github.com/mt-mods/mail.git
synced 2025-04-30 16:31:43 -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
|
G = G + c.g
|
||||||
B = B + c.b
|
B = B + c.b
|
||||||
end
|
end
|
||||||
R = R / #colors
|
R = math.floor(R / #colors + 0.5)
|
||||||
G = G / #colors
|
G = math.floor(G / #colors + 0.5)
|
||||||
B = B / #colors
|
B = math.floor(B / #colors + 0.5)
|
||||||
return {r=R,g=G,b=B}
|
return {r=R,g=G,b=B}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue