1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-02-07 13:31:54 +02:00
RedMew/map_gen/shape/spiral2.lua
Matthew 0927a839b8
Fix linting (#657)
Fix linting warnings
2019-01-19 11:34:29 -05:00

21 lines
524 B
Lua

return function(x, y)
local distance = math.sqrt(x * x + y * y)
if distance > 128 then
local angle = 180 + math.deg(math.atan2(x, y))
local offset = distance
local offset2 = distance
if angle ~= 0 then
offset2 = offset - angle / 3.75
offset = offset + angle / 3.75
end
--if angle ~= 0 then offset = offset + angle /1.33333333 end
if offset % 96 < 64 then
return offset2 % 96 >= 64
end
end
return true
end