Module:Ups and downs sharpness: Difference between revisions

Tristanbay (talk | contribs)
may work with placeholders now but I have to test it
Tristanbay (talk | contribs)
added "math." in a bunch of places
Line 22: Line 22:
for i = 1, sharp * 2 + 1 do
for i = 1, sharp * 2 + 1 do
tab = tab .. "|"
tab = tab .. "|"
if ((i - (sharp * floor(i / sharp))) / sharp) > math.floor(((i - (sharp * floor(i / sharp))) / sharp) + 0.5) then
if ((i - (sharp * math.floor(i / sharp))) / sharp) > math.floor(((i - (sharp * math.floor(i / sharp))) / sharp) + 0.5) then
if (i - (sharp * floor(i / sharp))) % 5 == 4 then
if (i - (sharp * math.floor(i / sharp))) % 5 == 4 then
tab = tab .. "down quip "
tab = tab .. "down quip "
else
else
for j = 1, (i - (sharp * floor(i / sharp))) % 5 do
for j = 1, (i - (sharp * math.floor(i / sharp))) % 5 do
tab = tab .. "up "
tab = tab .. "up "
end
end
end
end
for j = 1, floor((i - (sharp * floor(i / sharp))) / 5) do
for j = 1, math.floor((i - (sharp * math.floor(i / sharp))) / 5) do
tab = tab .. "quip "
tab = tab .. "quip "
end
end
else
else
if ((sharp * ceil(i / sharp)) - i) % 5 == 1 then
if ((sharp * math.ceil(i / sharp)) - i) % 5 == 1 then
tab = tab .. "up quid "
tab = tab .. "up quid "
else
else
for j = 1, ((sharp * ceil(i / sharp)) - i) % 5 do
for j = 1, ((sharp * math.ceil(i / sharp)) - i) % 5 do
tab = tab .. "down "
tab = tab .. "down "
end
end
end
end
for j = 1, floor(((sharp * ceil(i / sharp)) - i) / 5) do
for j = 1, math.floor(((sharp * math.ceil(i / sharp)) - i) / 5) do
tab = tab .. "quid "
tab = tab .. "quid "
end
end
Line 55: Line 55:
for i = 1, sharp * 2 + 1 do
for i = 1, sharp * 2 + 1 do
tab = tab .. "|"
tab = tab .. "|"
if ((i - (sharp * floor(i / sharp))) / sharp) > math.floor(((i - (sharp * floor(i / sharp))) / sharp) + 0.5) then
if ((i - (sharp * math.floor(i / sharp))) / sharp) > math.floor(((i - (sharp * math.floor(i / sharp))) / sharp) + 0.5) then
if (i - (sharp * floor(i / sharp))) % 5 == 4 then
if (i - (sharp * math.floor(i / sharp))) % 5 == 4 then
tab = tab .. "up quid "
tab = tab .. "up quid "
else
else
for j = 1, (i - (sharp * floor(i / sharp))) % 5 do
for j = 1, (i - (sharp * math.floor(i / sharp))) % 5 do
tab = tab .. "down "
tab = tab .. "down "
end
end
end
end
for j = 1, floor((i - (sharp * floor(i / sharp))) / 5) do
for j = 1, math.floor((i - (sharp * math.floor(i / sharp))) / 5) do
tab = tab .. "quid "
tab = tab .. "quid "
end
end
else
else
if ((sharp * ceil(i / sharp)) - i) % 5 == 1 then
if ((sharp * math.ceil(i / sharp)) - i) % 5 == 1 then
tab = tab .. "down quip "
tab = tab .. "down quip "
else
else
for j = 1, ((sharp * ceil(i / sharp)) - i) % 5 do
for j = 1, ((sharp * math.ceil(i / sharp)) - i) % 5 do
tab = tab .. "down "
tab = tab .. "down "
end
end
end
end
for j = 1, floor(((sharp * ceil(i / sharp)) - i) / 5) do
for j = 1, math.floor(((sharp * math.ceil(i / sharp)) - i) / 5) do
tab = tab .. "quip "
tab = tab .. "quip "
end
end