OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
oli_cproj.h
Go to the documentation of this file.
1 #ifndef OLI_CPROJ_H
2 #define OLI_CPROJ_H
3 
4 #include <math.h>
5 #include "oli_proj.h"
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.295779513082321
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 #endif