/* See LICENSE file for copyright and license details. */
#include "common.h"
#ifndef TEST
double
libtellurian_coarse_distance(double latitude1, double longitude1,
double latitude2, double longitude2)
{
latitude1 = radians(latitude1);
longitude1 = radians(longitude1);
latitude2 = radians(latitude2);
longitude2 = radians(longitude2);
return libtellurian_coarse_distance_radians(latitude1, longitude1, latitude2, longitude2);
}
#else
int
main(void)
{
ASSERT(libtellurian_coarse_distance(0, 0, 0, 0) == libtellurian_coarse_distance_radians(0, 0, 0, 0));
ASSERT(libtellurian_coarse_distance(90, 0, 0, 0) == libtellurian_coarse_distance_radians(D90, 0, 0, 0));
ASSERT(libtellurian_coarse_distance(90, 180, 0, 0) == libtellurian_coarse_distance_radians(D90, D180, 0, 0));
ASSERT(libtellurian_coarse_distance(90, 180, -45, 0) == libtellurian_coarse_distance_radians(D90, D180, -D45, 0));
ASSERT(libtellurian_coarse_distance(90, 180, -45, -30) == libtellurian_coarse_distance_radians(D90, D180, -D45, -D30));
return 0;
}
#endif