#include <math.h>
#include <QtCore/qglobal.h>
Go to the source code of this
file.
Define Documentation
| #define
QT_SINE_TABLE_SIZE 256 |
| #define
M_PI (3.14159265358979323846) |
Function Documentation
| int qCeil |
( |
qreal |
v |
) |
[inline] |
Definition at line 63 of file qmath.h.
{
#ifdef QT_USE_MATH_H_FLOATS
if (sizeof(qreal) == sizeof(float))
return int(ceilf(float(v)));
else
#endif
return int(ceil(v));
}
| int qFloor |
( |
qreal |
v |
) |
[inline] |
Definition at line 73 of file qmath.h.
{
#ifdef QT_USE_MATH_H_FLOATS
if (sizeof(qreal) == sizeof(float))
return int(floorf(float(v)));
else
#endif
return int(floor(v));
}
| qreal qFabs |
( |
qreal |
v |
) |
[inline] |
Definition at line 83 of file qmath.h.
{
#ifdef QT_USE_MATH_H_FLOATS
if(sizeof(qreal) == sizeof(float))
return fabsf(float(v));
else
#endif
return fabs(v);
}
| qreal qSin |
( |
qreal |
v |
) |
[inline] |
Definition at line 93 of file qmath.h.
{
#ifdef Q_OS_SYMBIAN
TReal sin_v;
Math::Sin(sin_v, static_cast<TReal>(v));
return static_cast<qreal>(sin_v);
#else
# ifdef QT_USE_MATH_H_FLOATS
if (sizeof(qreal) == sizeof(float))
return sinf(float(v));
else
# endif
return sin(v);
#endif
}
| qreal qCos |
( |
qreal |
v |
) |
[inline] |
Definition at line 109 of file qmath.h.
{
#ifdef Q_OS_SYMBIAN
TReal cos_v;
Math::Cos(cos_v, static_cast<TReal>(v));
return static_cast<qreal>(cos_v);
#else
# ifdef QT_USE_MATH_H_FLOATS
if (sizeof(qreal) == sizeof(float))
return cosf(float(v));
else
# endif
return cos(v);
#endif
}
| qreal qTan |
( |
qreal |
v |
) |
[inline] |
Definition at line 125 of file qmath.h.
{
#ifdef Q_OS_SYMBIAN
TReal tan_v;
Math::Tan(tan_v, static_cast<TReal>(v));
return static_cast<qreal>(tan_v);
#else
# ifdef QT_USE_MATH_H_FLOATS
if (sizeof(qreal) == sizeof(float))
return tanf(float(v));
else
# endif
return tan(v);
#endif
}
| qreal qAcos |
( |
qreal |
v |
) |
[inline] |
Definition at line 141 of file qmath.h.
{
#ifdef Q_OS_SYMBIAN
TReal acos_v;
Math::ACos(acos_v, static_cast<TReal>(v));
return static_cast<qreal>(acos_v);
#else
# ifdef QT_USE_MATH_H_FLOATS
if (sizeof(qreal) == sizeof(float))
return acosf(float(v));
else
# endif
return acos(v);
#endif
}
| qreal qAsin |
( |
qreal |
v |
) |
[inline] |
Definition at line 157 of file qmath.h.
{
#ifdef Q_OS_SYMBIAN
TReal asin_v;
Math::ASin(asin_v, static_cast<TReal>(v));
return static_cast<qreal>(asin_v);
#else
# ifdef QT_USE_MATH_H_FLOATS
if (sizeof(qreal) == sizeof(float))
return asinf(float(v));
else
# endif
return asin(v);
#endif
}
| qreal qAtan |
( |
qreal |
v |
) |
[inline] |
Definition at line 173 of file qmath.h.
{
#ifdef Q_OS_SYMBIAN
TReal atan_v;
Math::ATan(atan_v, static_cast<TReal>(v));
return static_cast<qreal>(atan_v);
#else
# ifdef QT_USE_MATH_H_FLOATS
if(sizeof(qreal) == sizeof(float))
return atanf(float(v));
else
# endif
return atan(v);
#endif
}
| qreal qAtan2 |
( |
qreal |
x, |
|
|
qreal |
y |
|
) |
|
[inline] |
Definition at line 189 of file qmath.h.
{
#ifdef Q_OS_SYMBIAN
TReal atan2_v;
Math::ATan(atan2_v, static_cast<TReal>(x), static_cast<TReal>(y));
return static_cast<qreal>(atan2_v);
#else
# ifdef QT_USE_MATH_H_FLOATS
if(sizeof(qreal) == sizeof(float))
return atan2f(float(x), float(y));
else
# endif
return atan2(x, y);
#endif
}
| qreal qSqrt |
( |
qreal |
v |
) |
[inline] |
Definition at line 205 of file qmath.h.
{
#ifdef Q_OS_SYMBIAN
TReal sqrt_v;
Math::Sqrt(sqrt_v, static_cast<TReal>(v));
return static_cast<qreal>(sqrt_v);
#else
# ifdef QT_USE_MATH_H_FLOATS
if (sizeof(qreal) == sizeof(float))
return sqrtf(float(v));
else
# endif
return sqrt(v);
#endif
}
| qreal qLn |
( |
qreal |
v |
) |
[inline] |
Definition at line 221 of file qmath.h.
{
#ifdef QT_USE_MATH_H_FLOATS
if (sizeof(qreal) == sizeof(float))
return logf(float(v));
else
#endif
return log(v);
}
| qreal qExp |
( |
qreal |
v |
) |
[inline] |
Definition at line 231 of file qmath.h.
{
#ifdef Q_OS_SYMBIAN
TReal exp_v;
Math::Exp(exp_v, static_cast<TReal>(v));
return static_cast<qreal>(exp_v);
#else
return exp(v);
#endif
}
| qreal qPow |
( |
qreal |
x, |
|
|
qreal |
y |
|
) |
|
[inline] |
Definition at line 244 of file qmath.h.
{
#ifdef Q_OS_SYMBIAN
TReal pow_v;
Math::Pow(pow_v, static_cast<TReal>(x), static_cast<TReal>(y));
return static_cast<qreal>(pow_v);
#else
# ifdef QT_USE_MATH_H_FLOATS
if (sizeof(qreal) == sizeof(float))
return powf(float(x), float(y));
else
# endif
return pow(x, y);
#endif
}
| qreal qFastSin |
( |
qreal |
x |
) |
[inline] |
| qreal qFastCos |
( |
qreal |
x |
) |
[inline] |
Variable Documentation