aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
blob: 36ca06f8a15d91d2f8d633932da068cd4bef9b08 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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);