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

◆ time_alphaf()

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

Definition at line 25 of file time_alpha.h.

25 {
26 if (now < start) {
27 return 0.0f;
28 }
29 u32 elapsed = now - start;
30 u32 total = end - start;
31 float out = static_cast<float>(elapsed) / static_cast<float>(total);
32 return out;
33}

References end(), and FL_NOEXCEPT.

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

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