Prevent the 0-distance exception being thrown while calculating distance between the same point.