FastLED
3.9.15
Loading...
Searching...
No Matches
◆
grad()
[3/4]
static int32_t grad
(
uint8_t
hash
,
int32_t
x
,
int32_t
y
,
int32_t
z
)
static
Definition at line
86
of file
simplex.cpp
.
86
{
87
int32_t h =
hash
& 15;
// Convert low 4 bits of hash code into 12 simple
88
int32_t u = h < 8 ?
x
:
y
;
// gradient directions, and compute dot product.
89
int32_t v = h < 4 ?
y
: (h == 12 || h == 14 ?
x
:
z
);
// Fix repeats at h = 12 to 15
90
return
((h&1) != 0 ? -u : u) + ((h&2) != 0 ? -v : v);
91
}
y
int y
Definition
Audio.ino:72
x
int x
Definition
Audio.ino:71
z
uint32_t z[NUM_LAYERS]
Definition
Fire2023.ino:84
fl::anonymous_namespace{noise_woryley.cpp}::hash
uint16_t hash(int32_t x, int32_t y)
Definition
noise_woryley.cpp:18
References
x
,
y
, and
z
.
simplex.cpp
Generated on Thu May 29 2025 04:44:57 for FastLED by
1.13.2