abstracted distance to DistanceMeasure() interface.