Closest to ball calculation.