Python Find distance between two coordinates
<p>I'm working with a range of 0 to 255.  </p>

<p>My data would be a set of numbers within this range. </p>

<p>Except I need the difference between</p>

<pre><code>255 &amp; 0 = 1
254 &amp; 5 = 7
</code></pre>

<p>So in a sense this range is a circular set, and 255 and 0 are the pole.  </p>

<p>Is there some function / easy way to do this?  Or do I need to take the second half of the range and assign it some value to be calculated against?  i.e. 255 becomes 255 - 254 if it is being compared against [1 - 127.4]</p>
