Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00027 #ifndef __CCP4_TYPES
00028 #define __CCP4_TYPES
00029
00030 #include "ccp4_sysdep.h"
00031
00032 typedef unsigned short uint16;
00033 #ifdef SIXTEENBIT
00034 typedef unsigned long uint32;
00035 #else
00036 typedef unsigned int uint32;
00037 #endif
00038 typedef float float32;
00039 typedef unsigned char uint8;
00040
00044 union float_uint_uchar {
00045 float32 f;
00046 uint32 i;
00047 uint8 c[4];
00048 };
00049
00051 typedef char *pstr;
00052
00053
00054
00055 #ifndef FALSE
00056 #define FALSE 0
00057 #define TRUE 1
00058 #endif
00059
00063 typedef struct { double r;
00064 double i;
00065 } COMPLEX;
00070 typedef struct { double r;
00071 double phi;
00072 } POLAR;
00074
00075
00079 #ifndef SQR
00080 #define SQR(x) ((x)*(x))
00081 #endif
00082
00087 #ifndef DEGREE
00088 #define DEGREE(x) ((((x < 0)?(x)+2*M_PI:(x))*360)/(2*M_PI))
00089 #endif
00090
00095 #ifndef RADIAN
00096 #define RADIAN(x) ((((x<0)?(x)+360:(x))*2*M_PI)/360)
00097 #endif
00098
00102 #ifndef MAX
00103 #define MAX(x, y) (((x)>(y))?(x):(y))
00104 #endif
00105
00109 #ifndef MIN
00110 #define MIN(x, y) (((x)<(y))?(x):(y))
00111 #endif
00112
00116 #ifndef ABS
00117 #define ABS(x) (((x)<0)?-(x):(x))
00118 #endif
00119
00123 #ifndef SIGN
00124 #define SIGN(x) (((x)<0)?-1:1)
00125 #endif
00126
00127 #endif
00128
00129
00130
00131
00132
00133