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

148 {
149 hash = hash & 15;
150 int16_t u,v;
151 if(hash > 8) { u=x;v=x; }
152 else if(hash < 4) { u=x;v=1; }
153 else { u=1;v=x; }
154 if(hash&1) { u = -u; }
155 if(hash&2) { v = -v; }
156
157 return AVG15(u,v);
158}
int x
Definition Audio.ino:71
uint16_t hash(int32_t x, int32_t y)

References x.