<p>also, it's the 90s, I can afford a sqrt().<br />I should fix it up for my version.</p><p>or use a squared lookup table. you could do this REAL easy by making it a table search: there's only 6 possible results: 2,3,4,5,6,7. each entry in the lookup table contains the maximum squared distance that can generate that number of hours</p>