Use Pythagoras to calculate the distance between two locations in km (based on their respective longitudes and latitudes).
For example: Berlin's coordinates are [52.5200°, 13.4050°]. New York's coordinates are [40.7128°, 74.0059°].
The two cities are approx 4811 km apart, according to Pythagoras (not taking into account factors such as the Earth's curvature).
HINTS:
- The earth's radius is assumed as 6371 km.
- Degrees to Radians: rad = deg * pi/180
108 Solvers
Back to basics 22 - Rotate a matrix
682 Solvers
261 Solvers
120 Solvers
79 Solvers
Problem Tags