@@ -59,8 +59,8 void ChartView::handleClickedPoint(const QPointF& point) | |||
|
59 | 59 | { |
|
60 | 60 | QPointF clickedPoint = point; |
|
61 | 61 | // Find the closest point from series 1 |
|
62 |
QPointF closest(INT |
|
|
63 |
qreal distance(INT |
|
|
62 | QPointF closest(INT_MAX, INT_MAX); | |
|
63 | qreal distance(INT_MAX); | |
|
64 | 64 | foreach(QPointF currentPoint, m_scatter->points()) { |
|
65 | 65 | qreal currentDistance = sqrt((currentPoint.x() - clickedPoint.x()) * (currentPoint.x() - clickedPoint.x()) |
|
66 | 66 | + (currentPoint.y() - clickedPoint.y()) * (currentPoint.y() - clickedPoint.y())); |
General Comments 0
You need to be logged in to leave comments.
Login now