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

◆ time_alphaf()

float fl::time_alphaf ( uint32_t now,
uint32_t start,
uint32_t end )
inline

Definition at line 17 of file time_alpha.h.

17 {
18 if (now < start) {
19 return 0.0f;
20 }
21 uint32_t elapsed = now - start;
22 uint32_t total = end - start;
23 float out = static_cast<float>(elapsed) / static_cast<float>(total);
24 return out;
25}

Referenced by fl::TimeClampedTransition::updatef().

+ Here is the caller graph for this function: