api: trim percentage before caching it

This commit is contained in:
shagu
2020-08-25 18:30:12 +02:00
parent fd418a4ac7
commit 990ec09296
+1
View File
@@ -1133,6 +1133,7 @@ local gradientcolors = {}
function pfUI.api.GetColorGradient(perc)
perc = perc > 1 and 1 or perc
perc = perc < 0 and 0 or perc
perc = floor(perc*100)/100
local index = perc
if not gradientcolors[index] then