comparing coordinates

lekirst's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I have 10 different inputs, each have an x and y coordinate.
However, the coordinates of some inputs seem to be very close together. (the difference is less then 10 on either the x or y coordinate)
If this is the case, I want those inputs be seen as one.
For example the 10 different inputs can become 7 inputs if some coordinates are almost the same.
Does anyone have a clue on the programming?

KrisW's icon

i dont understand it : "If this is the case, I want those inputs be seen as one."

do you want to hide elements ?

lekirst's icon

yes, combine instead of hide. or substitute.

the thing is for instance
sensor 1:
x= 10
y= 20

sensor 2:
x= 10
y= 25

Both are almost the same (so the difference between both x's and y's

KrisW's icon

i can write it in javascript if you want ,because there would be a mess on a screen . let me know

lekirst's icon

I'll see if I can program a way around it.
Thanks anyway!