File indexing completed on 2024-11-15 09:42:49
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #pragma once
0017
0018 #include <limits.h>
0019 #include <math.h>
0020
0021 #ifdef __cplusplus
0022 extern "C" {
0023 #endif
0024
0025 #ifdef MIN
0026 #undef MIN
0027 #endif
0028 #define MIN(a,b) ((a)<(b)?(a):(b))
0029
0030 #ifdef MAX
0031 #undef MAX
0032 #endif
0033 #define MAX(a,b) ((a)>(b)?(a):(b))
0034
0035 #ifdef BETWEEN
0036 #undef BETWEEN
0037 #endif
0038 #define BETWEEN(a,b,c) (((a) <= (b)) && ((b) <= (c)))
0039
0040 #ifndef M_PI
0041 #define M_PI 3.14159265358979323846
0042 #endif
0043
0044 #ifndef SQRT2
0045 #define SQRT2 1.41421356237309504880
0046 #endif
0047
0048 #define ROUND(f) ((f>=0)?(int)(f + .5):(int)(f - .5))
0049 #define RADIANS(deg) ((deg)/180.0 * M_PI)
0050 #define DEGREES(rad) ((rad)/M_PI * 180.0)
0051
0052 #define SQR(a) ((a) * (a))
0053
0054 #ifdef __cplusplus
0055 }
0056 #endif