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

◆ getProgress()

uint8_t fl::Transition::getProgress ( fl::u32 now)
inline

Definition at line 15 of file transition.h.

15 {
16 if (mNotStarted) {
17 return 0;
18 }
19 if (now < mStart) {
20 return 0;
21 } else if (now >= mStart + mDuration) {
22 return 255;
23 } else {
24 return ((now - mStart) * 255) / mDuration;
25 }
26 }
fl::u32 mStart
Definition transition.h:44
fl::u32 mDuration
Definition transition.h:45

References mDuration, mNotStarted, and mStart.