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

◆ grad16() [2/3]

static int16_t grad16 ( uint8_t hash,
int16_t x,
int16_t y )
inlinestatic

Definition at line 164 of file noise.cpp.

164 {
165 hash = hash & 7;
166 int16_t u,v;
167 if(hash < 4) { u = x; v = y; } else { u = y; v = x; }
168 if(hash&1) { u = -u; }
169 if(hash&2) { v = -v; }
170
171 return AVG15(u,v);
172}
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:80
uint32_t y[NUM_LAYERS]
Definition Fire2023.ino:81

References x, and y.