23 #ifndef _USE_MATH_DEFINES 24 #define _USE_MATH_DEFINES 25 #define undef_USE_MATH_DEFINES 30 #ifdef undef_USE_MATH_DEFINES 31 #undef _USE_MATH_DEFINES 32 #undef undef_USE_MATH_DEFINES 36 #define M_E (2.7182818284590452354) 40 #define M_LOG2E (1.4426950408889634074) 44 #define M_LOG10E (0.43429448190325182765) 48 #define M_LN2 (0.69314718055994530942) 52 #define M_LN10 (2.30258509299404568402) 56 #define M_PI (3.14159265358979323846) 60 #define M_PI_2 (1.57079632679489661923) 64 #define M_PI_4 (0.78539816339744830962) 68 #define M_1_PI (0.31830988618379067154) 72 #define M_2_PI (0.63661977236758134308) 76 #define M_2_SQRTPI (1.12837916709551257390) 80 #define M_SQRT2 (1.41421356237309504880) 84 #define M_SQRT1_2 (0.70710678118654752440) 87 #if defined( QT_WARNING_PUSH ) 89 QT_WARNING_DISABLE_CLANG(
"-Wdouble-promotion")
90 QT_WARNING_DISABLE_GCC("-Wdouble-promotion")
101 return ( a < b ) ? a : b;
107 return ( a < b ) ? a : b;
113 return ( a < b ) ? a : b;
119 return ( a < b ) ? a : b;
125 return ( a < b ) ? b : a;
131 return ( a < b ) ? b : a;
137 return ( a < b ) ? b : a;
143 return ( a < b ) ? b : a;
146 #if defined( QT_WARNING_PUSH ) 168 const double eps = qAbs( 1.0e-6 * intervalSize );
170 if ( value2 - value1 > eps )
173 if ( value1 - value2 > eps )
200 return -
M_PI_2 - x / ( x * x + 0.28 );
203 return M_PI_2 - x / ( x * x + 0.28 );
205 return x / ( 1.0 + x * x * 0.28 );
217 return ( y >= 0 ) ? d +
M_PI : d -
M_PI;
241 double a,
double b,
double c,
double d )
243 return ( ( ( a * x ) + b ) * x + c ) * x +
d;
249 return degrees *
M_PI / 180.0;
255 return degrees * 180.0 /
M_PI;
265 return int( ceil( value ) );
274 return int( floor( value ) );
enum MQTTPropertyCodes value
int qwtFuzzyCompare(double value1, double value2, double intervalSize)
Compare 2 values, relative to an interval.
QWT_CONSTEXPR float qwtMaxF(float a, float b)
double qwtDegrees(double degrees)
Translate radians into degrees.
QWT_CONSTEXPR float qwtMinF(float a, float b)
int qwtFloor(qreal value)
double qwtRadians(double degrees)
Translate degrees into radians.
QWT_EXPORT quint32 qwtRand()
Uses QRandomGenerator for Qt >= 5.10 and qRand() otherwise.
QWT_EXPORT double qwtNormalizeDegrees(double degrees)
Normalize an angle to be int the range [0.0, 360.0[.
double qwtCubicPolynom(double x, double a, double b, double c, double d)
int qwtSign(double x)
Return the sign.
double qwtFastAtan(double x)
Approximation of arc tangent ( error below 0,005 radians )
double qwtSqr(double x)
Return the square of a number.
double qwtFastAtan2(double y, double x)
Approximation of arc tangent ( error below 0,005 radians )
QWT_EXPORT double qwtNormalizeRadians(double radians)
Normalize an angle to be int the range [0.0, 2 * PI[.