FastLED 3.10.8
Loading...
Searching...
No Matches

◆ easeInSine8()

u8 fl::easeInSine8 ( u8 i)

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

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

143 {
144
145 static const u8 easeInSineTable[256] FL_PROGMEM = {
146 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
147 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4,
148 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8,
149 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14,
150 15, 16, 16, 17, 17, 18, 18, 19, 20, 20, 21, 21, 22, 23,
151 23, 24, 25, 25, 26, 27, 27, 28, 29, 30, 30, 31, 32, 33,
152 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, 42, 43, 44,
153 45, 46, 47, 48, 49, 50, 51, 52, 52, 53, 54, 55, 56, 57,
154 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72,
155 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 84, 86, 87, 88,
156 89, 90, 91, 93, 94, 95, 96, 98, 99, 100, 101, 103, 104, 105,
157 106, 108, 109, 110, 112, 113, 114, 115, 117, 118, 119, 121, 122, 123,
158 125, 126, 127, 129, 130, 132, 133, 134, 136, 137, 139, 140, 141, 143,
159 144, 146, 147, 148, 150, 151, 153, 154, 156, 157, 159, 160, 161, 163,
160 164, 166, 167, 169, 170, 172, 173, 175, 176, 178, 179, 181, 182, 184,
161 185, 187, 188, 190, 191, 193, 194, 196, 197, 199, 200, 202, 204, 205,
162 207, 208, 210, 211, 213, 214, 216, 217, 219, 221, 222, 224, 225, 227,
163 228, 230, 231, 233, 235, 236, 238, 239, 241, 242, 244, 246, 247, 249,
164 250, 252, 253, 255};
165
166 // ease-in sine: 1 - cos(t * π/2)
167 // Handle boundary conditions explicitly
168 return FL_PGM_READ_BYTE_NEAR(&easeInSineTable[i]);
169}
#define FL_PGM_READ_BYTE_NEAR(x)
Read a byte (8-bit) from PROGMEM memory.
#define FL_PROGMEM
PROGMEM keyword for storage.
unsigned char u8
Definition stdint.h:131

References FL_NO_EXCEPT, FL_PGM_READ_BYTE_NEAR, and FL_PROGMEM.

Referenced by ease8(), and ease8().

+ Here is the caller graph for this function: