C library of triangulation algorithms (for the problems of mobile robot positioning or resection)
const.h
Go to the documentation of this file.
1 /**
2  * @file const.h
3  * @author Vincent Pierlot
4  *
5 */
6 #ifndef __CONST_H__
7 #define __CONST_H__
8 
9 /** \def PI
10  \brief The value of PI
11  */
12 #define PI 3.141592654
13 #define TWOPI 6.283185307
14 #define FOURPI 12.566370614
15 #define HALFPI 1.570796327
16 #define QUARTPI 0.785398163
17 #define INVQUARTPI 1.273239545
18 #define INVTWOPI 0.159154943
19 
20 #define RAD2DEG (180/PI)
21 #define DEG2RAD (PI/180)
22 #define COT_MAX 100000000
23 
24 #define cot(x) ( 1 / tan(x) )
25 
26 #define abs(x) ( ( x < 0 ) ? -x : x )
27 
28 #define adjust_value_to_bounds( value , max ) ( ( value > max ) ? max : ( ( value < -max ) ? -max : value ) )
29 
30 #define Sin(x) sin(x)
31 #define Cos(x) cos(x)
32 #define Cot(x) cot(x)
33 #define Tan(x) tan(x)
34 
35 /** \var typedef tfloat
36  \brief Defines the type for float/double
37  */
38 typedef double tfloat ;
39 
40 #endif
41 
double tfloat
Defines the type for float/double.
Definition: const.h:38