title: Mapping unit square to (0, 1)
body: <p>In general, I am looking for an algorithm that (efficiently, hopefully) maps any point in the unit square (i.e. (0, 1) x (0, 1) to the (open or closed) interval (0, 1).</p>
  
  <p>More specifically, my problem is as follows: given 2 points in 2D, how can I find an ordering between them (i.e. one goes before the other) that is </p>
  
  <ul>
  <li>commutative </li>
  <li>does not involve "special" cases or testing floating point numbers for equality </li>
  </ul>
  
  <p>One possibility that springs to mind is a space-filling curve such as Morton or Hilbert, but I can't seem to find the description for the continuous case (only for discrete potints) and I'm sure there must be an alternative. </p>