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

◆ initPerm256()

void fl::FlowFieldFP::initPerm256 ( u8 * perm,
u32 seed )
staticprivate

Definition at line 492 of file flowfield.cpp.hpp.

492 {
493 for (int i = 0; i < 256; i++)
494 perm[i] = (u8)i;
495 u32 s = seed;
496 for (int i = 255; i > 0; i--) {
497 s = s * 1664525u + 1013904223u;
498 int j = (int)((s >> 16) % (u32)(i + 1));
499 u8 tmp = perm[i];
500 perm[i] = perm[j];
501 perm[j] = tmp;
502 }
503}
unsigned char u8
Definition stdint.h:131

References fl::FL_NO_EXCEPT.

Referenced by FlowFieldFP().

+ Here is the caller graph for this function: