From bfc3e07789bce94a348dd9aafd3dcceb72fc050e Mon Sep 17 00:00:00 2001 From: Allan Bazinet Date: Thu, 12 Sep 2024 11:55:13 -0700 Subject: [PATCH] Use general form of round up equation --- plotter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plotter.cpp b/plotter.cpp index 9e329b75..d19c9618 100644 --- a/plotter.cpp +++ b/plotter.cpp @@ -483,8 +483,7 @@ CPlotter::DrawOverlayScale(double const df, m_ScalePixmap.fill(Qt::white); p.drawRect(0, 0, m_w, 30); - int f = (m_startFreq + m_freqPerDiv - 1) / m_freqPerDiv; - f *= m_freqPerDiv; + int f = ((m_startFreq + m_freqPerDiv - 1) / m_freqPerDiv) * m_freqPerDiv; double xOffset = float(f - m_startFreq) / m_freqPerDiv; //draw tick marks on upper scale