16-bit sine ease-in/ease-out function Takes an input value 0-65535 and returns an eased value 0-65535
Definition at line 317 of file ease.cpp.
317 {
318
319
320 if (i == 0)
321 return 0;
322 if (i == 65535)
323 return 65535;
324
325
326
327
328
329 u32 angle = ((fl::u64)i * 8388608ULL) / 65535ULL;
331
332
333
334
335 fl::i64 adjusted = (2147418112LL - (fl::i64)cos_result) / 2;
336 return (u16)((fl::u64)adjusted * 65535ULL / 2147418112ULL);
337}
static FASTLED_FORCE_INLINE i32 cos32(u32 angle)
References cos32().
Referenced by ease16(), ease16(), and easeInOutSine8().