title: Find nearest neighbor with morton code
body: <p>I have implemented a <code>decode/encode</code> method for transforming 2d points into their respective <code>morton code</code>.</p>
  
  <p>What am i looking for is to find the nearest neighbor (under a <code>min_distance</code>)
  So for example something like this:</p>
  
  <pre><code>points=[(200,300),(500,150),(100,50)]
  mortonCodes = {}
  for p in points:
      mortonCodes[encode(p)] = p
  
  nearest = findNearestNeighbor(mortonCodes, (201,305))
  print(nearest) # ---&gt; should return (200,300)
  </code></pre>
  
  <p>Is this possible? </p>