This commit is contained in:
2025-03-26 03:13:38 +09:00
parent df276b05f3
commit 4ccf7fb37c

View File

@@ -80,8 +80,7 @@ if settings.startup['PHI-CT'].value then
return {x = math.floor(pos.x), y = math.floor(pos.y)} return {x = math.floor(pos.x), y = math.floor(pos.y)}
end end
math2d.direction = math2d.direction or {} math2d.direction = {vectors = {{x = 0, y = -1}, {x = 1, y = -1}, {x = 1, y = 0}, {x = 1, y = 1}, {x = 0, y = 1}, {x = -1, y = 1}, {x = -1, y = 0}, {x = -1, y = -1}}}
math2d.direction.vectors = {{x = 0, y = -1}, {x = 1, y = -1}, {x = 1, y = 0}, {x = 1, y = 1}, {x = 0, y = 1}, {x = -1, y = 1}, {x = -1, y = 0}, {x = -1, y = -1}}
function math2d.direction.from_vector(vec) function math2d.direction.from_vector(vec)
vec = math2d.position.ensure_xy(vec) vec = math2d.position.ensure_xy(vec)