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

◆ compute()

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

Implements fl::XYPathGenerator.

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

41 {
42 // α in [0,1] → (x,y) on the unit circle [-1, 1]
43 float t = alpha * 2.0f * FL_PI;
44 float x = cosf(t);
45 float y = sinf(t);
46 return vec2f(x, y);
47}
#define FL_PI
Definition math.h:26
vec2< float > vec2f
Definition geometry.h:333
float sinf(float value) FL_NOEXCEPT
Definition math.h:352
float cosf(float value) FL_NOEXCEPT
Definition math.h:358

References fl::cosf(), FL_PI, fl::sinf(), fl::t, fl::x, and fl::y.

+ Here is the call graph for this function: