FastLED 3.9.15
Loading...
Searching...
No Matches

◆ initPerm256()

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

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

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

Referenced by FlowFieldFP().

+ Here is the caller graph for this function: