Engauge Digitizer 2
Loading...
Searching...
No Matches
ExportAlignLog.cpp
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#include "ExportAlignLinear.h"
8#include "ExportAlignLog.h"
9#include <qmath.h>
10
12 double xMax)
13{
14 // Convert log numbers to linear numbers
15 double xMinLog = log10 (xMin);
16 double xMaxLog = log10 (xMax);
17
19 xMaxLog);
20
21 // Convert result back to log numbers
22 m_firstSimplestNumber = qPow (10.0, alignLinear.firstSimplestNumber ());
23}
24
26{
27 return m_firstSimplestNumber;
28}
29
30double ExportAlignLog::log10 (double in) const
31{
32 return qLn (in) / qLn (10.0);
33}
const int INNER_RADIUS_MIN
Pick first simplest x value between specified min and max, for linear scaling.
ExportAlignLog(double xMin, double xMax)
Single constructor.
double firstSimplestNumber() const
Result.