Engauge Digitizer 2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
LinearToLog Class Reference

Warps log coordinates to make them linear before passing them to code that accepts only linear coordinates. More...

#include <LinearToLog.h>

Collaboration diagram for LinearToLog:
Collaboration graph

Public Member Functions

 LinearToLog ()
 
double delinearize (double value, bool isLog) const
 Convert linear coordinates to log. This is a noop if the output is supposed to be linear.
 
double linearize (double value, bool isLog) const
 Convert log coordinates to linear. This is a noop if the input is already linear.
 

Detailed Description

Warps log coordinates to make them linear before passing them to code that accepts only linear coordinates.

For example, the Spline funtions are already complicated (third order polynomial interpolation) so upgrading them to handle log coordinates in addition to linear coordinates would be painful to implement and debug

Definition at line 13 of file LinearToLog.h.

Constructor & Destructor Documentation

◆ LinearToLog()

LinearToLog::LinearToLog ( )

Definition at line 10 of file LinearToLog.cpp.

11{
12}

Member Function Documentation

◆ delinearize()

double LinearToLog::delinearize ( double value,
bool isLog ) const

Convert linear coordinates to log. This is a noop if the output is supposed to be linear.

Definition at line 14 of file LinearToLog.cpp.

16{
18 if (isLog) {
20 }
21
22 return valueLinearOrLog;
23}
const int INNER_RADIUS_MIN

◆ linearize()

double LinearToLog::linearize ( double value,
bool isLog ) const

Convert log coordinates to linear. This is a noop if the input is already linear.

Definition at line 25 of file LinearToLog.cpp.

27{
29 if (isLog) {
31 }
32
33 return valueLinear;
34}

The documentation for this class was generated from the following files: