Not necessarily a direct distance comparison for each. For large numbers of checks, it may be more efficient to sort the list of points (text insertion?) by x/y values, in which case the point (nearest/insert/whatever) would just need to be located between the two list elements (essentially sorting it into the list), maybe with a quick distance check for the surrounding 2-4 points just to avoid local sorting issues.