FastLED
3.10.8
Loading...
Searching...
No Matches
◆
inoise16()
[3/4]
fl::u16 inoise16
(
fl::u32
x
,
fl::u32
y
,
fl::u32
z
)
extern
Parameters
z
z-axis coordinate on noise map (3D)
Definition at line
479
of file
noise.cpp.hpp
.
479
{
480
fl::i32 ans =
inoise16_raw
(
x
,
y
,
z
);
481
ans = ans + 19052L;
482
fl::u32 pan = ans;
483
// pan = (ans * 220L) >> 7. That's the same as:
484
// pan = (ans * 440L) >> 8. And this way avoids a 7X four-byte shift-loop on AVR.
485
// Identical math, except for the highest bit, which we don't care about anyway,
486
// since we're returning the 'middle' 16 out of a 32-bit value anyway.
487
pan *= 440L;
488
return
(pan>>8);
489
490
// // return scale16by8(pan,220)<<1;
491
// return ((inoise16_raw(x,y,z)+19052)*220)>>7;
492
// return scale16by8(inoise16_raw(x,y,z)+19052,220)<<1;
493
}
y
int y
Definition
simple.h:93
x
int x
Definition
simple.h:92
z
uint32_t z[NUM_LAYERS]
Definition
Fire2023.h:93
inoise16_raw
fl::i16 inoise16_raw(fl::u32 x, fl::u32 y, fl::u32 z) FL_NO_EXCEPT
Definition
noise.cpp.hpp:341
Noise Generation Functions
Generated on Thu Oct 22 2026 05:46:02 for FastLED by
1.13.2