If you're only ever comparing distances to each other it'll be much faster to use the squared distances instead. `(x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)` ... saves on a sqrt call.