Main MRPT website > C++ reference for MRPT 1.9.9
xsmath.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #ifndef XSMATH_H
10 #define XSMATH_H
11 
12 #include "xstypesconfig.h"
13 #include "xstypedefs.h"
14 #include "pstdint.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 XSTYPES_DLL_API extern const XsReal XsMath_e;
21 XSTYPES_DLL_API extern const XsReal XsMath_pi;
32 XSTYPES_DLL_API extern const XsReal XsMath_pt5;
34 XSTYPES_DLL_API extern const XsReal XsMath_one;
36 XSTYPES_DLL_API extern const XsReal XsMath_two;
43 
51 #ifndef XSENS_NO_INT64
53 #endif
54 
55 #ifdef __cplusplus
56 } // extern "C"
57 
58 namespace XsMath
59 {
60 //! \brief The value e
61 static const XsReal& e = XsMath_e;
62 //! \brief The value pi
63 static const XsReal& pi = XsMath_pi;
64 //! \brief A really small value
65 static const XsReal& tinyValue = XsMath_tinyValue;
66 //! \brief A convincingly large number
67 static const XsReal& hugeValue = XsMath_hugeValue;
68 //! \brief A value related to the precision of floating point arithmetic
69 //! (2.2204460492503131e-016)
70 static const XsReal& epsilon = XsMath_epsilon;
71 /*! \brief Square root of epsilon
72  \sa epsilon
73 */
74 static const XsReal& sqrtEpsilon = XsMath_sqrtEpsilon;
75 //! \brief Value that represents the subnormal number in floating point wizardry
76 static const XsReal& denormalized = XsMath_denormalized;
77 /*! \brief Square root of denormalized
78  \sa denormalized
79 */
80 static const XsReal& sqrtDenormalized = XsMath_sqrtDenormalized;
81 //! \brief Value to convert radians to degrees by multiplication
82 static const XsReal& rad2degValue = XsMath_rad2degValue;
83 //! \brief Value to convert degrees to radians by multiplication
84 static const XsReal& deg2radValue = XsMath_deg2radValue;
85 //! \brief 0
86 static const XsReal& zero = XsMath_zero;
87 //! \brief 0.25
88 static const XsReal& pt25 = XsMath_pt25;
89 //! \brief 0.5
90 static const XsReal& pt5 = XsMath_pt5;
91 //! \brief -0.5
92 static const XsReal& minusPt5 = XsMath_minusPt5;
93 //! \brief 1
94 static const XsReal& one = XsMath_one;
95 //! \brief -1
96 static const XsReal& minusOne = XsMath_minusOne;
97 //! \brief 2
98 static const XsReal& two = XsMath_two;
99 //! \brief 4
100 static const XsReal& four = XsMath_four;
101 //! \brief -2
102 static const XsReal& minusTwo = XsMath_minusTwo;
103 //! \brief -pi/2
104 static const XsReal& minusHalfPi = XsMath_minusHalfPi;
105 //! \brief pi/2
106 static const XsReal& halfPi = XsMath_halfPi;
107 //! \brief sqrt(2)
108 static const XsReal& sqrt2 = XsMath_sqrt2;
109 //! \brief infinity
110 static const XsReal& infinity = XsMath_infinity;
111 
112 //! \brief \copybrief XsMath_asinClamped
113 inline XsReal asinClamped(XsReal x) { return XsMath_asinClamped(x); }
114 //! \brief \copybrief XsMath_rad2deg
115 inline XsReal rad2deg(XsReal radians) { return XsMath_rad2deg(radians); }
116 //! \brief \copybrief XsMath_deg2rad
117 inline XsReal deg2rad(XsReal degrees) { return XsMath_deg2rad(degrees); }
118 //! \brief \copybrief XsMath_pow2
119 inline XsReal pow2(XsReal a) { return XsMath_pow2(a); }
120 //! \brief \copybrief XsMath_pow3
121 inline XsReal pow3(XsReal a) { return XsMath_pow3(a); }
122 //! \brief \copybrief XsMath_doubleToLong
123 inline int32_t doubleToLong(double d) { return XsMath_doubleToLong(d); }
124 #ifndef XSENS_NO_INT64
125 //! \brief \copybrief XsMath_doubleToInt64
126 inline int64_t doubleToInt64(double d) { return XsMath_doubleToInt64(d); }
127 #endif
128 } // namespace
129 #endif
130 
131 #endif // file guard
XsMath_tinyValue
const XSTYPES_DLL_API XsReal XsMath_tinyValue
XsMath_rad2deg
XSTYPES_DLL_API XsReal XsMath_rad2deg(XsReal radians)
XsMath_minusOne
const XSTYPES_DLL_API XsReal XsMath_minusOne
XsMath_halfPi
const XSTYPES_DLL_API XsReal XsMath_halfPi
XsMath_hugeValue
const XSTYPES_DLL_API XsReal XsMath_hugeValue
xstypedefs.h
XsMath_rad2degValue
const XSTYPES_DLL_API XsReal XsMath_rad2degValue
XsMath_four
const XSTYPES_DLL_API XsReal XsMath_four
int64_t
__int64 int64_t
Definition: rptypes.h:49
XsMath_sqrt2
const XSTYPES_DLL_API XsReal XsMath_sqrt2
XsMath_pt5
const XSTYPES_DLL_API XsReal XsMath_pt5
XsMath_pt25
const XSTYPES_DLL_API XsReal XsMath_pt25
XsMath_two
const XSTYPES_DLL_API XsReal XsMath_two
XsMath_minusTwo
const XSTYPES_DLL_API XsReal XsMath_minusTwo
XsMath_pi
const XSTYPES_DLL_API XsReal XsMath_pi
XsMath_one
const XSTYPES_DLL_API XsReal XsMath_one
XsMath_pow3
XSTYPES_DLL_API XsReal XsMath_pow3(XsReal a)
XsMath_epsilon
const XSTYPES_DLL_API XsReal XsMath_epsilon
XsMath_sqrtEpsilon
const XSTYPES_DLL_API XsReal XsMath_sqrtEpsilon
XsReal
double XsReal
Defines the floating point type used by the Xsens libraries.
Definition: xstypedefs.h:17
XsMath_doubleToInt64
XSTYPES_DLL_API int64_t XsMath_doubleToInt64(double d)
XsMath_infinity
const XSTYPES_DLL_API XsReal XsMath_infinity
XsMath_deg2radValue
const XSTYPES_DLL_API XsReal XsMath_deg2radValue
xstypesconfig.h
XsMath_minusPt5
const XSTYPES_DLL_API XsReal XsMath_minusPt5
XsMath_minusHalfPi
const XSTYPES_DLL_API XsReal XsMath_minusHalfPi
int32_t
__int32 int32_t
Definition: rptypes.h:46
pstdint.h
XsMath_pow2
XSTYPES_DLL_API XsReal XsMath_pow2(XsReal a)
XsMath_zero
const XSTYPES_DLL_API XsReal XsMath_zero
XsMath_sqrtDenormalized
const XSTYPES_DLL_API XsReal XsMath_sqrtDenormalized
XSTYPES_DLL_API
#define XSTYPES_DLL_API
Definition: xstypesconfig.h:9
XsMath_isFinite
XSTYPES_DLL_API int XsMath_isFinite(XsReal x)
XsMath_doubleToLong
XSTYPES_DLL_API int32_t XsMath_doubleToLong(double d)
XsMath_denormalized
const XSTYPES_DLL_API XsReal XsMath_denormalized
XsMath_asinClamped
XSTYPES_DLL_API XsReal XsMath_asinClamped(XsReal x)
x
GLenum GLint x
Definition: glext.h:3538
XsMath_e
const XSTYPES_DLL_API XsReal XsMath_e
a
GLubyte GLubyte GLubyte a
Definition: glext.h:6279
XsMath_deg2rad
XSTYPES_DLL_API XsReal XsMath_deg2rad(XsReal degrees)



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST