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 152 of file noise.cpp.

152 {
153 hash = hash & 15;
154 int16_t u,v;
155 if(hash > 8) { u=x;v=x; }
156 else if(hash < 4) { u=x;v=1; }
157 else { u=1;v=x; }
158 if(hash&1) { u = -u; }
159 if(hash&2) { v = -v; }
160
161 return AVG15(u,v);
162}
int x
Definition simple.h:92

References x.