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

◆ grad16() [2/3]

static int16_t grad16 ( uint8_t hash,
int16_t x,
int16_t y )
inlinestatic

Definition at line 138 of file noise.cpp.

138 {
139 hash = hash & 7;
140 int16_t u,v;
141 if(hash < 4) { u = x; v = y; } else { u = y; v = x; }
142 if(hash&1) { u = -u; }
143 if(hash&2) { v = -v; }
144
145 return AVG15(u,v);
146}
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:82
uint32_t y[NUM_LAYERS]
Definition Fire2023.ino:83
uint16_t hash(int32_t x, int32_t y)

References x, and y.