This distance-finding logic is still outside any function or class, so it can't be effectively tested.