april  1.0.0
...
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
geometry.h
Go to the documentation of this file.
1 /* ========================================================================= */
2 /* ------------------------------------------------------------------------- *//*
9 
10 
11  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12  Please read COPYING and README files in root folder
13  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 */
15 /* ------------------------------------------------------------------------- */
16 /* ========================================================================= */
17 #ifndef __GEOMETRY_INC__
18 #define __GEOMETRY_INC__
19 
20 #include <limits.h>
21 #include <qmath.h>
22 
26 #define COORDV int
27 
28 
32 #define COORDV_INFINITY INT_MAX
33 
34 
38 #define COORDV_EQ(a,b) ( qAbs( a - b ) < 0.0001 )
39 
40 
44 #define COORDV_SQR(a) qSqrt(a)
45 
46 
50 #define COORDV_SIN(a) qSin(a)
51 
52 
56 #define COORDV_COS(a) qCos(a)
57 
58 
62 #define COORDV_TAN(a) qTan(a)
63 
64 
68 #define COORDV_ASIN(a) qAsin(a) /*qFastSin(a)*/
69 
70 
74 #define COORDV_ACOS(a) qAcos(a) /*qFastCos(a)*/
75 
76 
80 #define COORDV_ATAN(a) qAtan(a)
81 
82 
86 #define COORDV_ATAN2(x, y) qAtan2(y, x)
87 
88 
92 #define COORDV_PI 3.141592653589793
93 
94 
98 #define COORDV_PI_DIV_2 1.5707963267948965
99 
100 
104 #define COORDV_PI_DIV_4 0.78539816339744825
105 
106 
110 #define COORDV_2_PI 6.283185307179586
111 
112 
113 
114 
115 #endif // __GEOMETRY_INC__
116 /* ------------------------------------------------------------------------- */
117 /* ========================================================================= */