@@ -36,14 +36,14 PolarDomain::~PolarDomain() | |||
|
36 | 36 | void PolarDomain::setSize(const QSizeF &size) |
|
37 | 37 | { |
|
38 | 38 | Q_ASSERT(size.width() == size.height()); |
|
39 | m_radius = size.height() / 2; | |
|
39 | m_radius = size.height() / 2.0; | |
|
40 | 40 | m_center = QPointF(m_radius, m_radius); |
|
41 | 41 | AbstractDomain::setSize(size); |
|
42 | 42 | } |
|
43 | 43 | |
|
44 | 44 | QPointF PolarDomain::calculateGeometryPoint(const QPointF &point, bool &ok) const |
|
45 | 45 | { |
|
46 | qreal r; | |
|
46 | qreal r = 0.0; | |
|
47 | 47 | qreal a = toAngularCoordinate(point.x(), ok); |
|
48 | 48 | if (ok) |
|
49 | 49 | r = toRadialCoordinate(point.y(), ok); |
@@ -60,8 +60,8 QVector<QPointF> PolarDomain::calculateGeometryPoints(const QList<QPointF> &vect | |||
|
60 | 60 | QVector<QPointF> result; |
|
61 | 61 | result.resize(vector.count()); |
|
62 | 62 | bool ok; |
|
63 | qreal r; | |
|
64 | qreal a; | |
|
63 | qreal r = 0.0; | |
|
64 | qreal a = 0.0; | |
|
65 | 65 | |
|
66 | 66 | for (int i = 0; i < vector.count(); ++i) { |
|
67 | 67 | a = toAngularCoordinate(vector[i].x(), ok); |
General Comments 0
You need to be logged in to leave comments.
Login now