MeanDistance function

The "Mean" distance