FastLED 3.9.15
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 133 of file ease.cpp.

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

Referenced by ease8(), and ease8().

+ Here is the caller graph for this function: