Add a .luacheckrc and some code style changes

This commit is contained in:
HybridDog
2021-10-24 19:50:00 +02:00
parent 6b259b94ad
commit 4e32b5e9a0
4 changed files with 69 additions and 61 deletions

View File

@ -24,12 +24,11 @@ function riesenpilz.circle(r)
if circle then
return circle
end
local circle, n = {}, 1
circle = {}
for i = -r, r do
for j = -r, r do
if math.floor(math.sqrt(i * i + j * j) + 0.5) == r then
circle[n] = {x=i, y=0, z=j}
n = n+1
circle[#circle+1] = {x=i, y=0, z=j}
end
end
end