Patrick Mullen wrote:
Also, if you are using sqrt for your distance check, you are likely wasting cpu cycles, if all you need to know is whether they are "close enough."
Also note that if you do need to compare exact Euclidean distances for some reason, you can avoid square roots by comparing the squares of the distances instead of the distances themselves. -- Greg