Engauge Digitizer  2
ExportAlignLog.cpp
1 #include "ExportAlignLinear.h"
2 #include "ExportAlignLog.h"
3 #include <qmath.h>
4 
6  double xMax)
7 {
8  // Convert log numbers to linear numbers
9  double xMinLog = log10 (xMin);
10  double xMaxLog = log10 (xMax);
11 
12  ExportAlignLinear alignLinear (xMinLog,
13  xMaxLog);
14 
15  // Convert result back to log numbers
16  m_firstSimplestNumber = qPow (10.0, alignLinear.firstSimplestNumber());
17 }
18 
20 {
21  return m_firstSimplestNumber;
22 }
23 
24 double ExportAlignLog::log10 (double in) const
25 {
26  return qLn (in) / qLn (10.0);
27 }
Pick first simplest x value between specified min and max, for linear scaling.
double firstSimplestNumber() const
Result.
double firstSimplestNumber() const
Result.
ExportAlignLog(double xMin, double xMax)
Single constructor.