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

◆ grad16() [1/3]

static int16_t grad16 ( uint8_t hash,
int16_t x )
inlinestatic

Definition at line 174 of file noise.cpp.

174 {
175 hash = hash & 15;
176 int16_t u,v;
177 if(hash > 8) { u=x;v=x; }
178 else if(hash < 4) { u=x;v=1; }
179 else { u=1;v=x; }
180 if(hash&1) { u = -u; }
181 if(hash&2) { v = -v; }
182
183 return AVG15(u,v);
184}
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:80

References x.