Pre-computed powers of two in lume.rgba

This commit is contained in:
Phoenix Enero 2014-05-06 09:41:02 +08:00
parent 1a82d308af
commit 6b73aaa8ad

View File

@ -435,9 +435,9 @@ end
function lume.rgba(color)
local a = math_floor((color / 2 ^ 24) % 256)
local r = math_floor((color / 2 ^ 16) % 256)
local g = math_floor((color / 2 ^ 08) % 256)
local a = math_floor((color / 16777216) % 256)
local r = math_floor((color / 65536) % 256)
local g = math_floor((color / 256) % 256)
local b = math_floor((color) % 256)
return r, g, b, a
end