Calculate distance to another point