Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/particles/qquickangledirection.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count |
---|---|---|
1 | - | |
2 | - | |
3 | const qreal CONV = 0.017453292519943295; | - |
4 | QQuickAngleDirection::QQuickAngleDirection(QObject *parent) : | - |
5 | QQuickDirection(parent) | - |
6 | , m_angle(0) | - |
7 | , m_magnitude(0) | - |
8 | , m_angleVariation(0) | - |
9 | , m_magnitudeVariation(0) | - |
10 | { | - |
11 | - | |
12 | } executed 84 times by 3 tests: end of block Executed by:
| 84 |
13 | - | |
14 | QPointF QQuickAngleDirection::sample(const QPointF &from) | - |
15 | { | - |
16 | (void)from;; | - |
17 | QPointF ret; | - |
18 | qreal theta = m_angle*CONV - m_angleVariation*CONV + QRandomGenerator::global()->generateDouble() * m_angleVariation*CONV * 2; | - |
19 | qreal mag = m_magnitude- m_magnitudeVariation + QRandomGenerator::global()->generateDouble() * m_magnitudeVariation * 2; | - |
20 | ret.setX(mag * qCos(theta)); | - |
21 | ret.setY(mag * qSin(theta)); | - |
22 | return executed 4864 times by 2 tests: ret;return ret; Executed by:
executed 4864 times by 2 tests: return ret; Executed by:
| 4864 |
23 | } | - |
24 | - | |
25 | - | |
26 | - | |
Switch to Source code | Preprocessed file |