It is being used to calculate the distance between two location using GeoDataSource TM products. Show the calculated distance on the UI. Using the distance formula shown in the above article find the horizontal distance between the two points by subtracting -8 from 2 which is 10.
You can also try a different route while coming back by adding multiple destinations.
The final app will look like this. We can either convert the polar points to rectangular points then use a simpler distance formula or we can skip the conversion to rectangular coordinates but use a more complicated distance formula. Then find the vertical distance between the points by subtracting 12 from 3 which is -9. Given the x y coordinates of two points you can get the distance between them hypotenuse given a distance and a direction from one CGPoint you can obtain the second CGPoint coordinates and so much more.