summaryrefslogtreecommitdiffstats
path: root/tests/manual/galaxy/galaxydata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/galaxy/galaxydata.cpp')
-rw-r--r--tests/manual/galaxy/galaxydata.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/manual/galaxy/galaxydata.cpp b/tests/manual/galaxy/galaxydata.cpp
index dfd8db94..c49e07fd 100644
--- a/tests/manual/galaxy/galaxydata.cpp
+++ b/tests/manual/galaxy/galaxydata.cpp
@@ -163,12 +163,12 @@ void GalaxyData::createGalaxy()
1000.0); // Anzahl der st├╝tzstellen
for (int i = 3; i < numOfStars; ++i) {
- qreal rad = cd.valFromProp(QRandomGenerator::getReal());
+ qreal rad = cd.valFromProp(QRandomGenerator::global()->generateDouble());
m_pStars[i].m_a = rad;
m_pStars[i].m_b = rad * getExcentricity(rad);
m_pStars[i].m_angle = getAngularOffset(rad);
- m_pStars[i].m_theta = 360.0 * QRandomGenerator::getReal();
+ m_pStars[i].m_theta = 360.0 * QRandomGenerator::global()->generateDouble();
m_pStars[i].m_center = QVector2D(0.0f, 0.0f);
m_pStars[i].calcXY();
@@ -179,14 +179,14 @@ void GalaxyData::createGalaxy()
qreal x, y, rad;
for (int i = 0; i < numOfDust; ++i)
{
- x = 2.0 * m_radGalaxy * QRandomGenerator::getReal() - m_radGalaxy;
- y = 2.0 * m_radGalaxy * QRandomGenerator::getReal() - m_radGalaxy;
+ x = 2.0 * m_radGalaxy * QRandomGenerator::global()->generateDouble() - m_radGalaxy;
+ y = 2.0 * m_radGalaxy * QRandomGenerator::global()->generateDouble() - m_radGalaxy;
rad = sqrt(x*x + y*y);
m_pDust[i].m_a = rad;
m_pDust[i].m_b = rad * getExcentricity(rad);
m_pDust[i].m_angle = getAngularOffset(rad);
- m_pDust[i].m_theta = 360.0 * QRandomGenerator::getReal();
+ m_pDust[i].m_theta = 360.0 * QRandomGenerator::global()->generateDouble();
m_pDust[i].m_center = QVector2D(0.0f, 0.0f);
m_pDust[i].calcXY();
@@ -196,15 +196,15 @@ void GalaxyData::createGalaxy()
// Initialize H2
for (int i = 0; i < numOfH2; ++i)
{
- x = 2*(m_radGalaxy) * QRandomGenerator::getReal() - (m_radGalaxy);
- y = 2*(m_radGalaxy) * QRandomGenerator::getReal() - (m_radGalaxy);
+ x = 2*(m_radGalaxy) * QRandomGenerator::global()->generateDouble() - (m_radGalaxy);
+ y = 2*(m_radGalaxy) * QRandomGenerator::global()->generateDouble() - (m_radGalaxy);
rad = sqrt(x*x + y*y);
int k1 = 2*i;
m_pH2[k1].m_a = rad;
m_pH2[k1].m_b = rad * getExcentricity(rad);
m_pH2[k1].m_angle = getAngularOffset(rad);
- m_pH2[k1].m_theta = 360.0 * QRandomGenerator::getReal();
+ m_pH2[k1].m_theta = 360.0 * QRandomGenerator::global()->generateDouble();
m_pH2[k1].m_center = QVector2D(0.0f, 0.0f);
m_pH2[k1].calcXY();