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

Function AttackRemapFactor

examples/LuminescentGrand/shared/util.cpp:23–32  ·  view source on GitHub ↗

Given an input time.

Source from the content-addressed store, hash-verified

21
22// Given an input time.
23float AttackRemapFactor(uint32_t delta_t_ms) {
24 typedef InterpData<uint32_t, float> Datum;
25 static const Datum kData[] = {
26 Datum(0, .5),
27 Datum(80, 1.0),
28 };
29
30 static const int n = sizeof(kData) / sizeof(kData[0]);
31 return Interp(delta_t_ms, kData, n);
32}
33
34float MapDecayTime(uint8_t key_idx) {
35 typedef InterpData<uint8_t, float> Datum;

Callers 2

AttackRemapFactorMethod · 0.85
UpdateIntensityMethod · 0.85

Calls 1

InterpFunction · 0.85

Tested by

no test coverage detected