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

◆ time_alpha16()

u16 fl::time_alpha16 ( u32 now,
u32 start,
u32 end )

Definition at line 24 of file time_alpha.cpp.

24 {
25 if (now < start) {
26 return 0;
27 }
28 if (now > end) {
29 return 65535;
30 }
31 u32 elapsed = now - start;
32 u32 total = end - start;
33 u32 out = (elapsed * 65535) / total;
34 if (out > 65535) {
35 out = 65535;
36 }
37 return static_cast<u16>(out);
38}
constexpr T * end(T(&array)[N]) noexcept

References end().

+ Here is the call graph for this function: