SPH
|
Class representing an ordinary 1D linear function. More...
#include <Analysis.h>
Public Member Functions | |
LinearFunction (const Float slope, const Float offset) | |
Creates a new linear function. More... | |
INLINE Float | operator() (const Float x) const |
Evaluates the linear function for given value. More... | |
Float | slope () const |
Returns the slope of the function. More... | |
Float | offset () const |
Returns the offset in y-direction. More... | |
Float | solve (const Float y) const |
Finds a value of x such that f(x) = y for given y. More... | |
Class representing an ordinary 1D linear function.
Definition at line 311 of file Analysis.h.
Creates a new linear function.
slope | Slope of the function (atan of the angle between the line and the x-axis). |
offset | Offset in y-direction (value of the function for x=0). |
Definition at line 320 of file Analysis.h.
|
inline |
Returns the offset in y-direction.
Definition at line 335 of file Analysis.h.
Evaluates the linear function for given value.
Definition at line 325 of file Analysis.h.
|
inline |
Returns the slope of the function.
Definition at line 330 of file Analysis.h.
Finds a value of x such that f(x) = y for given y.
Slope of the function must not be zero.
Definition at line 342 of file Analysis.h.