mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[apps/regression] Fix NaN comparison in isCursorHanging method
This commit is contained in:
committed by
LeaNumworks
parent
7646f13ca8
commit
b7bbb258a8
@@ -271,7 +271,9 @@ bool GraphController::isCursorHanging() {
|
||||
} else {
|
||||
xy = Coordinate2D<double>(m_store->get(*m_selectedSeriesIndex, 0, *m_selectedDotIndex), m_store->get(*m_selectedSeriesIndex, 1, *m_selectedDotIndex));
|
||||
}
|
||||
return xy.x1() != m_cursor->x() || xy.x2() != m_cursor->y();
|
||||
// NaN != Nan returns true, but cursor is not hanging if both values are NaN
|
||||
return (xy.x1() != m_cursor->x() && !(std::isnan(xy.x1()) && std::isnan(m_cursor->x())))
|
||||
|| (xy.x2() != m_cursor->y() && !(std::isnan(xy.x2()) && std::isnan(m_cursor->y())));
|
||||
}
|
||||
|
||||
bool GraphController::moveCursorVertically(int direction) {
|
||||
|
||||
Reference in New Issue
Block a user