#include <C:/Work/specialnumbers_svn/NumberLib/NumbersLib/PeriodicResponseCurve.h>
It works exactly like ResponseCurve, except that the input is wrapped so that it is always between the inputMin and the inputMax. Note that the value returned for inputMax is the same as the output at inputMin.
Definition at line 16 of file PeriodicResponseCurve.h.
Public Member Functions | |
T | getInputMax () const |
Returns the outputMin for this PeriodicResponseCurve (the value passed to the constructor). | |
T | getInputMin () const |
Returns the inputMin for this PeriodicResponseCurve (the value pass to the constructor). | |
T | operator() (const T input) const |
A new inputValue is calculated so that. | |
PeriodicResponseCurve (T inputMin, T inputMax, T outputSamples[n]) | |
Constructs a new Periodic response curve. | |
Private Attributes | |
ResponseCurve< T, n > | mResponseCurve |
PeriodicResponseCurve | ( | T | inputMin, | |
T | inputMax, | |||
T | outputSamples[n] | |||
) | [inline] |
Constructs a new Periodic response curve.
inputMin | The minimum value an input can be. | |
inputMax | The maximum value an input can be. | |
outputSamples | Samples of outputs. |
Definition at line 71 of file PeriodicResponseCurve.h.
T getInputMax | ( | ) | const [inline] |
Returns the outputMin for this PeriodicResponseCurve (the value passed to the constructor).
Definition at line 90 of file PeriodicResponseCurve.h.
References mResponseCurve.
Referenced by operator()().
T getInputMin | ( | ) | const [inline] |
Returns the inputMin for this PeriodicResponseCurve (the value pass to the constructor).
Definition at line 84 of file PeriodicResponseCurve.h.
References mResponseCurve.
Referenced by operator()().
T operator() | ( | const T | input | ) | const [inline] |
A new inputValue is calculated so that.
newInputValue = (inPutValue) + m * (inputMax - inputMin)
for some integer m such that
inputMin < newInputValue < inputMax
Then an index is calculated for this input value, and the output is interpolated between outputSample[index] and outputSample[index + 1].
input | The input for which output is sought. |
Definition at line 76 of file PeriodicResponseCurve.h.
References getInputMax(), getInputMin(), luma::numbers::mod(), and mResponseCurve.
ResponseCurve<T, n> mResponseCurve [private] |
Definition at line 66 of file PeriodicResponseCurve.h.
Referenced by getInputMax(), getInputMin(), and operator()().