title: find if 4 points on a plane form a rectangle?
body: <p>Can somebody please show me in C-style pseudocode how to write a function (represent the points however you like) that returns true if 4-points (args to the function) form a rectangle, and false otherwise?</p>
  
  <p>I came up with a solution that first tries to find 2 distinct pairs of points with equal x-value, then does this for the y-axis.  But the code is rather long.  Just curious to see what others come up with.</p>