Macros | Functions
qwt_math.h File Reference
#include "qwt_global.h"
#include <cmath>
Include dependency graph for qwt_math.h:

Go to the source code of this file.

Macros

#define _USE_MATH_DEFINES
 
#define M_1_PI   (0.31830988618379067154)
 
#define M_2_PI   (0.63661977236758134308)
 
#define M_2_SQRTPI   (1.12837916709551257390)
 
#define M_E   (2.7182818284590452354)
 
#define M_LN10   (2.30258509299404568402)
 
#define M_LN2   (0.69314718055994530942)
 
#define M_LOG10E   (0.43429448190325182765)
 
#define M_LOG2E   (1.4426950408889634074)
 
#define M_PI   (3.14159265358979323846)
 
#define M_PI_2   (1.57079632679489661923)
 
#define M_PI_4   (0.78539816339744830962)
 
#define M_SQRT1_2   (0.70710678118654752440)
 
#define M_SQRT2   (1.41421356237309504880)
 
#define undef_USE_MATH_DEFINES
 

Functions

int qwtCeil (qreal value)
 
double qwtCubicPolynom (double x, double a, double b, double c, double d)
 
double qwtDegrees (double degrees)
 Translate radians into degrees. More...
 
double qwtFastAtan (double x)
 Approximation of arc tangent ( error below 0,005 radians ) More...
 
double qwtFastAtan2 (double y, double x)
 Approximation of arc tangent ( error below 0,005 radians ) More...
 
int qwtFloor (qreal value)
 
int qwtFuzzyCompare (double value1, double value2, double intervalSize)
 Compare 2 values, relative to an interval. More...
 
QWT_CONSTEXPR float qwtMaxF (float a, float b)
 
QWT_CONSTEXPR double qwtMaxF (double a, double b)
 
QWT_CONSTEXPR qreal qwtMaxF (float a, double b)
 
QWT_CONSTEXPR qreal qwtMaxF (double a, float b)
 
QWT_CONSTEXPR float qwtMinF (float a, float b)
 
QWT_CONSTEXPR double qwtMinF (double a, double b)
 
QWT_CONSTEXPR qreal qwtMinF (float a, double b)
 
QWT_CONSTEXPR qreal qwtMinF (double a, float b)
 
QWT_EXPORT double qwtNormalizeDegrees (double degrees)
 Normalize an angle to be int the range [0.0, 360.0[. More...
 
QWT_EXPORT double qwtNormalizeRadians (double radians)
 Normalize an angle to be int the range [0.0, 2 * PI[. More...
 
double qwtRadians (double degrees)
 Translate degrees into radians. More...
 
QWT_EXPORT quint32 qwtRand ()
 Uses QRandomGenerator for Qt >= 5.10 and qRand() otherwise. More...
 
int qwtSign (double x)
 Return the sign. More...
 
double qwtSqr (double x)
 Return the square of a number. More...
 

Macro Definition Documentation

#define _USE_MATH_DEFINES

Definition at line 24 of file qwt_math.h.

#define M_1_PI   (0.31830988618379067154)

Definition at line 68 of file qwt_math.h.

#define M_2_PI   (0.63661977236758134308)

Definition at line 72 of file qwt_math.h.

#define M_2_SQRTPI   (1.12837916709551257390)

Definition at line 76 of file qwt_math.h.

#define M_E   (2.7182818284590452354)

Definition at line 36 of file qwt_math.h.

#define M_LN10   (2.30258509299404568402)

Definition at line 52 of file qwt_math.h.

#define M_LN2   (0.69314718055994530942)

Definition at line 48 of file qwt_math.h.

#define M_LOG10E   (0.43429448190325182765)

Definition at line 44 of file qwt_math.h.

#define M_LOG2E   (1.4426950408889634074)

Definition at line 40 of file qwt_math.h.

#define M_PI   (3.14159265358979323846)

Definition at line 56 of file qwt_math.h.

#define M_PI_2   (1.57079632679489661923)

Definition at line 60 of file qwt_math.h.

#define M_PI_4   (0.78539816339744830962)

Definition at line 64 of file qwt_math.h.

#define M_SQRT1_2   (0.70710678118654752440)

Definition at line 84 of file qwt_math.h.

#define M_SQRT2   (1.41421356237309504880)

Definition at line 80 of file qwt_math.h.

#define undef_USE_MATH_DEFINES

Definition at line 25 of file qwt_math.h.

Function Documentation

int qwtCeil ( qreal  value)
inline

The same as qCeil, but avoids including qmath.h

Returns
Ceiling of value.

Definition at line 262 of file qwt_math.h.

double qwtCubicPolynom ( double  x,
double  a,
double  b,
double  c,
double  d 
)
inline

Definition at line 240 of file qwt_math.h.

double qwtDegrees ( double  degrees)
inline

Translate radians into degrees.

Definition at line 253 of file qwt_math.h.

double qwtFastAtan ( double  x)
inline

Approximation of arc tangent ( error below 0,005 radians )

Definition at line 197 of file qwt_math.h.

double qwtFastAtan2 ( double  y,
double  x 
)
inline

Approximation of arc tangent ( error below 0,005 radians )

Definition at line 209 of file qwt_math.h.

int qwtFloor ( qreal  value)
inline

The same as qFloor, but avoids including qmath.h

Returns
Floor of value.

Definition at line 271 of file qwt_math.h.

int qwtFuzzyCompare ( double  value1,
double  value2,
double  intervalSize 
)
inline

Compare 2 values, relative to an interval.

Values are "equal", when : $\cdot value2 - value1 <= abs(intervalSize * 10e^{-6})$

Parameters
value1First value to compare
value2Second value to compare
intervalSizeinterval size
Returns
0: if equal, -1: if value2 > value1, 1: if value1 > value2

Definition at line 166 of file qwt_math.h.

QWT_CONSTEXPR float qwtMaxF ( float  a,
float  b 
)
inline
Returns
Maximum of a and b.

Definition at line 123 of file qwt_math.h.

QWT_CONSTEXPR double qwtMaxF ( double  a,
double  b 
)
inline
Returns
Maximum of a and b.

Definition at line 129 of file qwt_math.h.

QWT_CONSTEXPR qreal qwtMaxF ( float  a,
double  b 
)
inline
Returns
Maximum of a and b.

Definition at line 135 of file qwt_math.h.

QWT_CONSTEXPR qreal qwtMaxF ( double  a,
float  b 
)
inline
Returns
Maximum of a and b.

Definition at line 141 of file qwt_math.h.

QWT_CONSTEXPR float qwtMinF ( float  a,
float  b 
)
inline
Returns
Minimum of a and b.

Definition at line 99 of file qwt_math.h.

QWT_CONSTEXPR double qwtMinF ( double  a,
double  b 
)
inline
Returns
Minimum of a and b.

Definition at line 105 of file qwt_math.h.

QWT_CONSTEXPR qreal qwtMinF ( float  a,
double  b 
)
inline
Returns
Minimum of a and b.

Definition at line 111 of file qwt_math.h.

QWT_CONSTEXPR qreal qwtMinF ( double  a,
float  b 
)
inline
Returns
Minimum of a and b.

Definition at line 117 of file qwt_math.h.

QWT_EXPORT double qwtNormalizeDegrees ( double  degrees)

Normalize an angle to be int the range [0.0, 360.0[.

Parameters
radiansAngle in degrees
Returns
Normalized angle in degrees

Definition at line 35 of file qwt_math.cpp.

QWT_EXPORT double qwtNormalizeRadians ( double  radians)

Normalize an angle to be int the range [0.0, 2 * PI[.

Parameters
radiansAngle in radians
Returns
Normalized angle in radians

Definition at line 20 of file qwt_math.cpp.

double qwtRadians ( double  degrees)
inline

Translate degrees into radians.

Definition at line 247 of file qwt_math.h.

QWT_EXPORT quint32 qwtRand ( )

Uses QRandomGenerator for Qt >= 5.10 and qRand() otherwise.

Returns
A 32-bit random quantity

Definition at line 48 of file qwt_math.cpp.

int qwtSign ( double  x)
inline

Return the sign.

Definition at line 180 of file qwt_math.h.

double qwtSqr ( double  x)
inline

Return the square of a number.

Definition at line 191 of file qwt_math.h.



plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 04:02:49