| 1 |
#include <math.h> |
| 2 |
|
| 3 |
#ifdef __cplusplus |
| 4 |
extern "C" { |
| 5 |
#endif |
| 6 |
|
| 7 |
#define PI 3.141592653589793238 |
| 8 |
#define HALF_PI (PI*0.5) |
| 9 |
#define TWO_PI (PI*2.0) |
| 10 |
#define EPSLN 1.0e-10 |
| 11 |
#define R2D 57.2957795131 |
| 12 |
/* |
| 13 |
#define D2R 0.0174532925199 |
| 14 |
*/ |
| 15 |
#define D2R 1.745329251994328e-2 |
| 16 |
#define S2R 4.848136811095359e-6 |
| 17 |
|
| 18 |
#define OK 0 |
| 19 |
#define ERROR -1 |
| 20 |
#define IN_BREAK -2 |
| 21 |
|
| 22 |
/* Misc macros |
| 23 |
-----------*/ |
| 24 |
#define SQUARE(x) ((x) * (x)) /* x**2 */ |
| 25 |
#define CUBE(x) ((x) * (x) * (x)) /* x**3 */ |
| 26 |
#define QUAD(x) ((x) * (x) * (x) * (x)) /* x**4 */ |
| 27 |
|
| 28 |
#define GMAX(A, B) ((A) > (B) ? (A) : (B)) /* assign maximum of a and b */ |
| 29 |
#define GMIN(A, B) ((A) < (B) ? (A) : (B)) /* assign minimum of a and b */ |
| 30 |
|
| 31 |
#define IMOD(A, B) (A) - (((A) / (B)) * (B)) /* Integer mod function */ |
| 32 |
|
| 33 |
#include "cproj_prototypes.h" |
| 34 |
|
| 35 |
#ifdef __cplusplus |
| 36 |
} |
| 37 |
#endif |