update javadocs for distance calculations