FastLED 3.10.8
Loading...
Searching...
No Matches

◆ grad16() [1/3]

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

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

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

References FL_NO_EXCEPT, and x.