Engauge Digitizer
2
Export
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
11
ExportAlignLog::ExportAlignLog
(
double
xMin,
12
double
xMax)
13
{
14
// Convert log numbers to linear numbers
15
double
xMinLog = log10 (xMin);
16
double
xMaxLog = log10 (xMax);
17
18
ExportAlignLinear
alignLinear (xMinLog,
19
xMaxLog);
20
21
// Convert result back to log numbers
22
m_firstSimplestNumber = qPow (10.0, alignLinear.
firstSimplestNumber
());
23
}
24
25
double
ExportAlignLog::firstSimplestNumber
()
const
26
{
27
return
m_firstSimplestNumber;
28
}
29
30
double
ExportAlignLog::log10 (
double
in)
const
31
{
32
return
qLn (in) / qLn (10.0);
33
}
ExportAlignLinear
Pick first simplest x value between specified min and max, for linear scaling.
Definition:
ExportAlignLinear.h:14
ExportAlignLinear.h
ExportAlignLog::firstSimplestNumber
double firstSimplestNumber() const
Result.
Definition:
ExportAlignLog.cpp:25
ExportAlignLinear::firstSimplestNumber
double firstSimplestNumber() const
Result.
Definition:
ExportAlignLinear.cpp:54
ExportAlignLog::ExportAlignLog
ExportAlignLog(double xMin, double xMax)
Single constructor.
Definition:
ExportAlignLog.cpp:11
ExportAlignLog.h
Generated on Sat Jan 4 2020 12:00:00 for Engauge Digitizer by
1.8.16