Distance depends on the path
A
B
shortest distance is along the straight path