equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
8 ** |
8 ** |
52 // |
52 // |
53 // We mean it. |
53 // We mean it. |
54 // |
54 // |
55 |
55 |
56 #include <math.h> |
56 #include <math.h> |
|
57 #include <qmath.h> |
57 |
58 |
58 QT_BEGIN_NAMESPACE |
59 QT_BEGIN_NAMESPACE |
59 |
60 |
60 static const qreal Q_PI = qreal(3.14159265358979323846); // pi |
61 static const qreal Q_PI = qreal(3.14159265358979323846); // pi |
61 static const qreal Q_2PI = qreal(6.28318530717958647693); // 2*pi |
62 static const qreal Q_2PI = qreal(6.28318530717958647693); // 2*pi |
62 static const qreal Q_PI2 = qreal(1.57079632679489661923); // pi/2 |
63 static const qreal Q_PI2 = qreal(1.57079632679489661923); // pi/2 |
63 |
64 |
|
65 inline int qIntSqrtInt(int v) |
|
66 { |
|
67 return static_cast<int>(qSqrt(static_cast<qreal>(v))); |
|
68 } |
|
69 |
64 QT_END_NAMESPACE |
70 QT_END_NAMESPACE |
65 |
71 |
66 #endif // QMATH_P_H |
72 #endif // QMATH_P_H |