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

◆ time_alpha16()

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

Definition at line 25 of file time_alpha.cpp.hpp.

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

References end(), and FL_NOEXCEPT.

+ Here is the call graph for this function: