imath.h
Go to the documentation of this file.
1 #ifndef imath_included
2 #define imath_included
3 
4 
5 // Qt includes
6 #include <QtCore/QtGlobal>
7 #if QT_VERSION < 0x050000
8 #include <limits>
9 #define qInf std::numeric_limits<double>::infinity
10 inline bool qIsNaN(double x){ return x != x; }
11 #endif
12 
13 // ACF includes
14 #include <iser/iser.h>
15 
19 static const double I_PI = 3.14159265358979323846;
20 
24 static const double I_2PI = 6.2831853071795864769;
25 
26 
36 namespace imath
37 {
38 
39 
40 inline double GetRadianFromDegree(double degree)
41 {
42  return degree / 180.0 * I_PI;
43 }
44 
45 
46 inline double GetDegreeFromRadian(double radian)
47 {
48  return radian * 180.0 / I_PI;
49 }
50 
51 
52 } // namespace imath
53 
54 
55 #endif // !imath_included
56 
double GetRadianFromDegree(double degree)
Definition: imath.h:40
static const double I_2PI
Mathematical constant value 2 * PI.
Definition: imath.h:24
static const double I_PI
Mathematical constant value PI.
Definition: imath.h:19
bool qIsNaN(double x)
Definition: imath.h:10
double GetDegreeFromRadian(double radian)
Definition: imath.h:46

© 2007-2017 Witold Gantzke and Kirill Lepskiy