FastLED
3.10.8
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
229
of file
noise.cpp.hpp
.
230
{
231
// since the tests below can be done bit-wise on the bottom
232
// three bits, there's no need to mask off the higher bits
233
// hash = hash & 7;
234
235
fl::i8
u,v;
236
if
( hash & 4) {
237
u =
y
; v =
x
;
238
}
else
{
239
u =
x
; v =
y
;
240
}
241
242
if
(hash&1) { u = -u; }
243
if
(hash&2) { v = -v; }
244
245
return
fl::avg7(u,v);
246
}
y
int y
Definition
simple.h:93
x
int x
Definition
simple.h:92
fl::i8
signed char i8
Definition
stdint.h:130
References
FL_NO_EXCEPT
,
x
, and
y
.
noise.cpp.hpp
Generated on Sun Oct 18 2026 00:56:56 for FastLED by
1.13.2