It is my understanding that both your assumptions are correct. Distance is center to center, i.e., between the x,y coordinates of each agent, regardless of the shape or size of the agent. You would have to calculate the distance between the center of each agent and its edge if you wanted to know the edge-to-edge difference. This might be tricky if agents not more-or-less symmetrical around their center. A coracle perhaps?!