mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 04:51:40 +09:00
Fixed hex encoder
This commit is contained in:
@@ -13,7 +13,7 @@ local function to_hex(color)
|
|||||||
local hex_digits = '0123456789ABCDEF'
|
local hex_digits = '0123456789ABCDEF'
|
||||||
local function hex(bit)
|
local function hex(bit)
|
||||||
local major, minor = math.modf(bit/16)
|
local major, minor = math.modf(bit/16)
|
||||||
minor = minor*16
|
major,minor = major+1,minor*16+1
|
||||||
return hex_digits:sub(major,major)..hex_digits:sub(minor,minor)
|
return hex_digits:sub(major,major)..hex_digits:sub(minor,minor)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user