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

◆ getProgress()

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

Definition at line 14 of file transition.h.

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

References mDuration, mNotStarted, and mStart.