(A here is [0,0], but could have different coords)
I want to generate them from a for() loop into a table, so it would look like this :
Code: Select all
function genPoints(x,y) --Coords of A
local points = {}
local point = {}
for i = 1, 4 do
point.x, point.y = [?]
point.otherData = [...]
table.insert(points, point)
end
return points
end
Edit : I ended up with this :
point.x = x + (50*i-150)%100,
point.y = y + (50*i-100)%100,
...but the modulo automatically converts invert negative values... still searching...