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

◆ LuminanceDecay()

float anonymous_namespace{Painter.cpp}::LuminanceDecay ( float time)

Definition at line 15 of file Painter.cpp.

15 {
16 typedef InterpData<float, float> Datum;
17 static const Datum kData[] = {
18 Datum(0, 0),
19 Datum(1, 0),
20 Datum(10, 0),
21 Datum(47, 60),
22 Datum(120, 100),
23 Datum(230, 160),
24 Datum(250, 255),
25 Datum(254, 255),
26 Datum(255, 64),
27 };
28
29 const float key = time * 255.f;
30 static const int n = sizeof(kData) / sizeof(kData[0]);
31 float approx_val = Interp(key, kData, n);
32
33
34 static const float k = (1.0f / 255.f);
35 const float out = approx_val * k;
36 return out;
37}
ValT Interp(const KeyT &k, const InterpData< KeyT, ValT > *array, const int n)

References Interp().

Referenced by CalcLuminance().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: