16 BezierCubic(POINT pp0, POINT pp1, POINT pp2, POINT pp3) {
Set(pp0, pp1, pp2, pp3); }
17 void Set(POINT pp0, POINT pp1, POINT pp2, POINT pp3) {
p0 = pp0;
p3 = pp3;
s1 = pp1*3.0f - pp0 - pp3;
s2 = pp2*3.0f - pp3 - pp0; }
22 return lerp(p03, s12, 1.0f - t);
Different curves.
Definition angularpfeedbackloop.h:17
__forceinline float lerp(float x, float y, float l)
Linearly interpolate between 2 values: ret = x + l * (y - x)
Definition scalar.h:597
BezierCubic(POINT pp0, POINT pp1, POINT pp2, POINT pp3)
Definition curves.h:16
POINT p0
Definition curves.h:25
POINT p3
Definition curves.h:25
void Set(POINT pp0, POINT pp1, POINT pp2, POINT pp3)
Definition curves.h:17
POINT s2
Definition curves.h:25
POINT s1
Definition curves.h:25
POINT Eval(float t)
Definition curves.h:18