Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local cache = {}
- local precision = 1
- function HSVToColorFast(h,s,v)
- h = math.Round(h, precision)
- s = math.Round(s, precision)
- v = math.Round(v, precision)
- cache[h] = cache[h] or {}
- cache[h][s] = cache[h][s] or {}
- cache[h][s][v] = cache[h][s][v] or HSVToColor(h,s,v)
- return cache[h][s][v]
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement