Surely it is a small problem that has already been solved… I need to calculate the lower left and the upper right of a rectangle represented by two points:
p4-------------p2
| |
| |
p1-------------p3
(foo p1 p2) ==> (p1 p2)
(foo p2 p1) ==> (p1 p2)
(foo p3 p4) ==> (p1 p2)
(foo p4 p3) ==> (p1 p2)
returns a list of 2 points the lower left and the upper right