mirror of
https://github.com/JS8Call-improved/JS8Call-improved
synced 2026-08-13 17:47:36 -04:00
Use general form of round up equation
This commit is contained in:
parent
8df8f7e6ea
commit
bfc3e07789
1 changed files with 1 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue