diff options
Diffstat (limited to '')
-rw-r--r-- | common.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/common.h b/common.h new file mode 100644 index 0000000..36ca06f --- /dev/null +++ b/common.h @@ -0,0 +1,19 @@ +/* See LICENSE file for copyright and license details. */ +#include "libtellurian.h" + +#include <stddef.h> +#include <math.h> + + +#if __GNUC__ +# pragma GCC diagnostic ignored "-Wunsuffixed-float-constants" +#endif + + +#define radians(DEG) ((double)M_PI / 180.0 * (DEG)) +#define degrees(RAD) (180.0 / (double)M_PI * (RAD)) +#define haversin(X) (fma(-0.5, cos(X), 0.5)) + + +void libtellurian_vincenty_inverse__(double latitude1, double longitude1, double latitude2, double longitude2, + double *distance_out, double *azimuth1_out, double *azimuth2_out); |