chooseDistantObject modified to eliminate double precision value effect