11namespace tracktion {
inline namespace engine
19 int getNumPoints()
const noexcept {
return points.
size(); }
22 float getY (
float x)
const
24 const int num = points.
size();
42 const float alpha = (x - p1.x) / (p2.x - p1.x);
43 const float alpha2 = alpha * alpha;
44 const float a0 = p3.y - p2.y - p0.y + p1.y;
45 return (a0 * alpha * alpha2) + ((p0.y - p1.y - a0) * alpha2) + ((p2.y - p0.y) * alpha) + p1.y;
49 void clear() { points.
clear(); }
50 void removePoint (
int index) { points.
remove (index); }
52 void addPoint (
float x,
float y)
54 int i = points.
size();
72 points.
insert (++i, { x, y });
int size() const noexcept
void remove(int indexToRemove)
void insert(int indexToInsertAt, ParameterType newElement)
ElementType getFirst() const noexcept
ElementType & getReference(int index) noexcept
ElementType getLast() const noexcept
constexpr Type jmin(Type a, Type b)
constexpr Type jmax(Type a, Type b)
An interpolated spline curve, used by the EQ to draw its response graph.