FastLED 3.10.8
Loading...
Searching...
No Matches

◆ compute()

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

Implements fl::XYPathGenerator.

Definition at line 26 of file xypath_impls.cpp.hpp.

26 {
27 // α in [0,1] → (x,y) on the line
28 float x = params().x0 + alpha * (params().x1 - params().x0);
29 float y = params().y0 + alpha * (params().y1 - params().y0);
30 return {x, y};
31}
LinePathParams & params() FL_NO_EXCEPT

References fl::FL_NO_EXCEPT, params(), fl::x, and fl::y.

+ Here is the call graph for this function: