I have a 4-point shape that is defined in screen space by the user. They can draw the 4 points, one at a time, in any order they wish.
I am using a List of Vector2's to store the screen co-ordinates of each point.
Now what I'm trying to do is figure out how to get which of each of those 4 points are the topleft, topright, bottomleft and bottomright points of this shape, but I'm not having any luck.
I've tried using topleft = MinX, MinY etc, but obviously this doesn't work as the topleft point doesn't necessarily contain both the MinX and MinY value.
Can anyone point me in the right direction.