#include <curves.h>
A real-valued cubic curve. It has a "start" point where accuracy is highest.
Static Methods | |
static Cubic | hermite (Sample x0, Sample x1, Sample y0, Sample y1, Sample g0, Sample g1) |
Cubic segment based on start/end values and gradients. More... | |
static Cubic | smooth (Sample x0, Sample x1, Sample x2, Sample x3, Sample y0, Sample y1, Sample y2, Sample y3, bool monotonic=false) |
Cubic segment (valid between x1 and x2 ), which is smooth when applied to an adjacent set of points. More... | |
Methods | |
Cubic (Sample xStart, Sample a0, Sample a1, Sample a2, Sample a3) | |
Sample | operator() (Sample x) const |
Sample | start () const |
The reference x-value, used as the centre of the cubic expansion. More... | |
Cubic | dx () const |
Differentiate. More... | |
Sample | dx (Sample x) const |
|
inline |
Differentiate.
|
inlinestatic |
Cubic segment based on start/end values and gradients.
|
inlinestatic |
Cubic segment (valid between x1
and x2
), which is smooth when applied to an adjacent set of points.
If x0 == x1
or x2 == x3
it will choose a gradient which continues in a quadratic curve, or 0 if the point is a local minimum/maximum.
|
inline |
The reference x-value, used as the centre of the cubic expansion.