MCPcopy Create free account
hub / github.com/FastLED/FastLED / easeInSine8

Function easeInSine8

src/fl/math/ease.cpp.hpp:142–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

ease8Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected