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

◆ grad16() [1/3]

static fl::i16 grad16 ( fl::u8 hash,
fl::i16 x )
inlinestatic

Definition at line 157 of file noise.cpp.hpp.

157 {
158 hash = hash & 15;
159 fl::i16 u,v;
160 if(hash > 8) { u=x;v=x; }
161 else if(hash < 4) { u=x;v=1; }
162 else { u=1;v=x; }
163 if(hash&1) { u = -u; }
164 if(hash&2) { v = -v; }
165
166 return AVG15(u,v);
167}
int x
Definition simple.h:92

References x.