How I like to code

Monthly Archives: February 2008

Calculating distance between 2 points on Earth using the Haversine formula

2016 Update The code and the Xcode project for this article is now also available on GitHub. A while ago, I worked on a project where I had to implement code in C/C++ that could calculate the distance between 2 locations within the United States. It would be nice if the Earth was flat, since […]