FastLED 3.9.15
Loading...
Searching...
No Matches

◆ compute()

vec2f fl::LinePath::compute ( float alpha)
overridevirtual

Implements fl::XYPathGenerator.

Definition at line 25 of file xypath_impls.cpp.

25 {
26 // α in [0,1] → (x,y) on the line
27 float x = params().x0 + alpha * (params().x1 - params().x0);
28 float y = params().y0 + alpha * (params().y1 - params().y0);
29 return {x, y};
30}
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:82
uint32_t y[NUM_LAYERS]
Definition Fire2023.ino:83
LinePathParams & params()

References params(), x, fl::LinePathParams::x0, fl::LinePathParams::x1, y, fl::LinePathParams::y0, and fl::LinePathParams::y1.

+ Here is the call graph for this function: