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

◆ time_alphaf()

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

Definition at line 17 of file time_alpha.h.

17 {
18 if (now < start) {
19 return 0.0f;
20 }
21 u32 elapsed = now - start;
22 u32 total = end - start;
23 float out = static_cast<float>(elapsed) / static_cast<float>(total);
24 return out;
25}
constexpr T * end(T(&array)[N]) noexcept

References end().

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

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