MCPcopy Create free account
hub / github.com/FastLED/FastLED / compute

Method compute

src/fl/gfx/xypath_impls.cpp.hpp:25–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25vec2f LinePath::compute(float alpha) {
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}
31
32void LinePath::set(float x0, float y0, float x1, float y1) {
33 params().x0 = x0;

Callers

nothing calls this directly

Calls 6

cosfFunction · 0.85
sinfFunction · 0.85
powfFunction · 0.85
fabsfFunction · 0.85
sqrtfFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected