mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-06 13:40:00 +00:00
api: trim percentage before caching it
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user