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

◆ grad16() [2/3]

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

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

148 {
149 hash = hash & 7;
150 fl::i16 u,v;
151 if(hash < 4) { u = x; v = y; } else { u = y; v = x; }
152 if(hash&1) { u = -u; }
153 if(hash&2) { v = -v; }
154
155 return AVG15(u,v);
156}
int y
Definition simple.h:93
int x
Definition simple.h:92

References FL_NO_EXCEPT, x, and y.