FastLED
3.9.15
Loading...
Searching...
No Matches
◆
grad8()
[2/3]
static
fl::i8
grad8
(
fl::u8
hash
,
fl::i8
x
,
fl::i8
y
)
inline
static
Definition at line
218
of file
noise.cpp.hpp
.
219
{
220
// since the tests below can be done bit-wise on the bottom
221
// three bits, there's no need to mask off the higher bits
222
// hash = hash & 7;
223
224
fl::i8
u,v;
225
if
( hash & 4) {
226
u =
y
; v =
x
;
227
}
else
{
228
u =
x
; v =
y
;
229
}
230
231
if
(hash&1) { u = -u; }
232
if
(hash&2) { v = -v; }
233
234
return
fl::avg7(u,v);
235
}
y
int y
Definition
simple.h:93
x
int x
Definition
simple.h:92
fl::i8
signed char i8
Definition
stdint.h:130
References
x
, and
y
.
noise.cpp.hpp
Generated on Tue Jun 16 2026 00:07:02 for FastLED by
1.13.2