The Haversine formula is used to calculate the distance between two points on the surface of a sphere, given their latitudes and longitudes. This formula accounts for the spherical shape of the Earth and helps compute the great-circle distance, which is the shortest path between two points on the surface.
New to topics? Read the docs here!