Go to the documentation of this file.
24 #define M_PI 3.14159265358979323846
32 #define M_2PI (2.0*M_PI)
38 #ifndef ANGLE_ACCURACY
44 #define ANGLE_ACCURACY 1e-4
60 #define SWAP(a,b,c) {c=a;a=b;b=c;}
75 #define PI2PI(a) { if ((a<-M_PI)||(a>M_PI)) { while(a>M_PI) a-=M_2PI; while (a<-M_PI) a+=M_2PI; }}
87 #define NEW(_var,_n,_type) {(_var)=(_type *)malloc(sizeof(_type)*(_n)); \
88 if (!(_var)) exit(EXIT_FAILURE);}
98 #define NEWZ(_var,_n,_type) {(_var)=(_type *)calloc(_n,sizeof(_type)); \
99 if (!(_var)) exit(EXIT_FAILURE);}
110 #define MEM_EXPAND(_var,_n,_type) {(_var)=(_type *)realloc((void *)(_var),sizeof(_type)*(_n)); \
111 if (!(_var)) exit(EXIT_FAILURE);}
123 #define MEM_DUP(_var,_n,_type) {(_n)*=2;MEM_EXPAND(_var,_n,_type);}
133 #define NO_UINT ((unsigned int)(-1))
unsigned int boolean Boolean type.
|
Follow us!