use distance square to find nearest point.