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

◆ isActive()

bool fl::TimeClampedTransition::isActive ( u32 now) const
inlineoverridevirtual

Implements fl::TimeAlpha.

Definition at line 124 of file time_alpha.h.

124 {
125 bool not_started = (mEnd == 0) && (mStart == 0);
126 if (not_started) {
127 // if we have not started, we are not active
128 return false;
129 }
130 if (now < mStart) {
131 // if the time is before the start, we are not active
132 return false;
133 }
134 if (now > mEnd) {
135 // if the time is after the finished rising, we are not active
136 return false;
137 }
138 return true;
139 }

References FL_NOEXCEPT, mEnd, and mStart.