Ask Your Question

Revision history [back]

Finding 4 Corners in an array of (X,Y) coordinates

Good day,

I have an array of points which represent points in a 2d map.

I need to find the topleft, topright, bottomleft, bottomright points in that map. However, there are alot of points in between and out. What is the easiest way I can do this? I could find the value with the highest y, but that might not have the highest x and so on.

Just letting me know the logic would be great.