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

◆ inoise8() [1/3]

uint8_t inoise8 ( uint16_t x)
extern

8-Bit, fixed point implementation of Perlin's noise.

See also
inoise8_raw()
Returns
scaled noise value as an unsigned integer, 0-255
Parameters
xx-axis coordinate on noise map (1D)

Definition at line 668 of file noise.cpp.

668 {
669 int8_t n = inoise8_raw(x); //-64..+64
670 n += 64; // 0..128
671 uint8_t ans = qadd8(n,n); // 0..255
672 return ans;
673}
int x
Definition Audio.ino:71
LIB8STATIC_ALWAYS_INLINE uint8_t qadd8(uint8_t i, uint8_t j)
Add one byte to another, saturating at 0xFF.
Definition math8.h:31
int8_t inoise8_raw(uint16_t x, uint16_t y, uint16_t z)
8-bit, fixed point implementation of Perlin's noise without scaling.
Definition noise.cpp:549

References inoise8_raw(), qadd8(), and x.

+ Here is the call graph for this function: