Go to the documentation of this file.
75 #if defined(SQUISHCOCO)
76 #define XSMATHCONST static const
77 #define XSMATHINLINE2 static
78 #define XSMATHINLINE static
80 #else // normal operation
81 #if defined( __cplusplus)
82 #if defined(__ADSP21000__)
83 #define XSMATHCONST static const
84 #define XSMATHINLINE inline static
86 #elif defined(__ANDROID_API__) || defined(__APPLE__)
87 #define XSMATHCONST static constexpr
88 #define XSMATHINLINE inline static
90 #elif defined(__AVR32__)
91 #define XSMATHCONST static const
92 #define XSMATHINLINE inline static
95 #define XSMATHCONST static constexpr
96 #define XSMATHINLINE inline static constexpr
99 #define XSMATHINLINE2 inline static
101 #define XSMATHCONST static const
102 #define XSMATHINLINE static
103 #define XSMATHINLINE2 static
104 #define WANTXSMATH2 0
124 #ifdef XSENS_SINGLE_PRECISION
179 #ifdef XSENS_SINGLE_PRECISION
253 #elif defined(isfinite) || defined(__APPLE__)
255 #elif defined(__ANDROID_API__)
259 return std::isfinite(x);
263 #elif defined(_ADI_COMPILER)
264 return !(isnan(x) || isinf(x));
281 return (
d >= 0) ? (int64_t) floorf(
d + 0.5
f) : (int64_t) ceilf(
d - 0.5
f);
295 return (
d >= 0) ? (int64_t) floor(
d + 0.5) : (int64_t) ceil(
d - 0.5);
XSMATHCONST XsReal XsMath_pi
The value pi.
XSMATHINLINE XsReal XsMath_asinClamped(const XsReal x)
Returns asin(x) for -1 < x < 1.
XSMATHCONST XsReal XsMath_twoPi
2*pi
XSMATHCONST XsReal XsMath_one
1.0
XSMATHCONST XsReal XsMath_sqrtEpsilon
Square root of XsMath_epsilon.
XSMATHCONST XsReal XsMath_sqrtDenormalized
Square root of XsMath_denormalized.
XSMATHINLINE2 int64_t XsMath_doubleToInt64(double d)
Returns d integer converted from a double precision floating point value.
XSMATHCONST XsReal XsMath_minusPt5
-0.5
XSMATHCONST XsReal XsMath_minusTwo
-2
XSMATHCONST XsReal XsMath_sqrt2
sqrt(2)
XSMATHCONST XsReal XsMath_tinyValue
A really small value.
XSMATHINLINE XsReal XsMath_pow3(XsReal a)
Returns a to the power of 3.
XSMATHCONST XsReal XsMath_minusOne
-1.0
XSMATHCONST XsReal XsMath_denormalized
Value that represents the subnormal number in floating point wizardry.
XSMATHCONST XsReal XsMath_pt5
0.5
XSMATHINLINE XsReal XsMath_rad2deg(XsReal radians)
Convert radians to degrees.
double XsReal
Defines the floating point type used by the Xsens libraries.
XSMATHCONST XsReal XsMath_pt25
0.25
XSMATHCONST XsReal XsMath_infinity
infinity value
XSMATHINLINE2 int32_t XsMath_doubleToLong(double d)
Returns d integer converted from a double precision floating point value.
XSMATHCONST XsReal XsMath_e
The value e.
XSMATHINLINE2 int64_t XsMath_floatToInt64(float d)
Returns d integer converted from a single precision floating point value.
XSMATHCONST XsReal XsMath_two
2
XSMATHCONST XsReal XsMath_epsilon
A value related to the precision of floating point arithmetic (2.2204460492503131e-016)
XSMATHINLINE2 int32_t XsMath_floatToLong(float d)
Returns d integer converted from a single precision floating point value.
XSMATHCONST XsReal XsMath_minusHalfPi
-pi/2
XSMATHCONST XsReal XsMath_zero
0
XSMATHINLINE XsReal XsMath_pow5(XsReal a)
Returns a to the power of 5.
XSMATHINLINE2 int XsMath_isFinite(XsReal x)
Returns non-zero if x is finite.
XSMATHINLINE XsReal XsMath_pow2(XsReal a)
Returns a to the power of 2.
XSMATHCONST XsReal XsMath_sqrtHalf
sqrt(0.5)
XSMATHCONST XsReal XsMath_hugeValue
A convincingly large number.
XSMATHINLINE XsReal XsMath_deg2rad(XsReal degrees)
Convert degrees to radians.
XSMATHCONST XsReal XsMath_halfPi
pi/2
XSMATHCONST XsReal XsMath_rad2degValue
Value to convert radians to degrees by multiplication.
XSMATHCONST XsReal XsMath_deg2radValue
Value to convert degrees to radians by multiplication.
XSMATHCONST XsReal XsMath_four
4