I have a table with several tables of 5 positions where the first two are the position in a Cartesian plane.
--Table with water collors
colors = {{r=15,g=94,b=156},{r=35,g=137,b=218},{r=28,g=163,b=236},{r=90,g=188,b=216},{r=116,g=204,b=244}}
points = {}
for i=1,10000 do
j = love.math.random(1,table.getn(colors)-1)
table.insert(points,{i,i,colors[j].r,colors[j].g,colors[j].b})
I'm making a method to change the position (the first two positions of the vector) of this object, but for this I need to know if it has any object on top of the other, ie if the first two values of the table match the value of another table, I'm assuming that comparing one by one is impractical, I thought of using oxey as the key to a hash, but I do not know if that's possible, does anyone know of any alternatives?