Module:Ups and downs sharpness: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
Line 63: Line 63:
tab = tab .. "|-\n! Flat symbol\n"
tab = tab .. "|-\n! Flat symbol\n"
for i = 1, sharp * 2 + 1 do
for i = 1, sharp * 2 + 1 do
tab = tab .. "| style=\"white-space: nowrap;\" | "
local cs = math.ceil((i / sharp) - 0.5)
tab = tab .. "| <span style=\"display: inline-block; margin-bottom: -45px; transform: translate(0, "
if cs == 0 then
tab = tab .. "-2.5px"
elseif cs == 1 then
tab = tab .. "-15px"
elseif cs == 2 then
tab = tab .. "-20px"
end
if ((i - (sharp * math.floor(i / sharp))) / sharp) > math.ceil(((i - (sharp * math.floor(i / sharp))) / sharp) - 0.5) then
if ((i - (sharp * math.floor(i / sharp))) / sharp) > math.ceil(((i - (sharp * math.floor(i / sharp))) / sharp) - 0.5) then
if (i - (sharp * math.floor(i / sharp))) % 5 == 4 then
if (i - (sharp * math.floor(i / sharp))) % 5 == 4 then
Line 87: Line 95:
end
end
end
end
if math.ceil((i / sharp) - 0.5) == 1 then
if cs == 1 then
tab = tab .. "&#x202F;[[File:Heji11.svg|16px]]"
tab = tab .. "&#x202F;[[File:Heji11.svg|16px]]"
elseif math.ceil((i / sharp) - 0.5) == 2 then
elseif cs == 2 then
tab = tab .. "&#x202F;[[File:Heji4.svg|27px]]"
tab = tab .. "&#x202F;[[File:Heji4.svg|27px]]"
end
end
tab = tab .. "\n"
tab = tab .. "</span>\n"
end
end
tab = tab .. "|}"
tab = tab .. "|}"