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

◆ easeInOutSine8()

u8 fl::easeInOutSine8 ( u8 i)

8-bit sine ease-in/ease-out function Takes an input value 0-255 and returns an eased value 0-255 Smooth sinusoidal acceleration and deceleration

Definition at line 179 of file ease.cpp.hpp.

179 {
180 // ease-in-out sine: -(cos(π*t) - 1) / 2
181 // Delegate to 16-bit version for consistency and accuracy
182 // Scale 8-bit input to 16-bit range, call 16-bit function, scale result back
183 u16 input16 = map8_to_16(i);
184 u16 result16 = easeInOutSine16(input16);
185 return map16_to_8(result16);
186}
u16 map8_to_16(u8 x) FL_NOEXCEPT
Definition intmap.h:48
u8 map16_to_8(u16 x) FL_NOEXCEPT
Definition intmap.h:66
u16 easeInOutSine16(u16 i)
16-bit sine ease-in/ease-out function Takes an input value 0-65535 and returns an eased value 0-65535
Definition ease.cpp.hpp:326

References easeInOutSine16(), map16_to_8(), and map8_to_16().

Referenced by ease8(), and ease8().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: