How Mathematically to find the closest distance rect between 2 points Summing the distances in x and y
Example
For departure = [0.4, 1] and destination = [0.9, 3], the output should be perfectCity(departure, destination) = 2.7.
0.6 + 2 + 0.1 = 2.7, which is the answer.
https://i.stack.imgur.com/PthPO.png
https://i.stack.imgur.com/DdW21.png
sorry for my English..