/* See LICENSE file for copyright and license details. */ #include "common.h" double libtellurian_coarse_distance_radians(double latitude1, double longitude1, double latitude2, double longitude2) { double h = fma(haversin(longitude2 - longitude1), cos(latitude1) * cos(latitude2), haversin(latitude2 - latitude1)); return 2.0 * LIBTELLURIAN_AUTHALIC_RADIUS * asin(sqrt(h)); }