FastLED 3.10.8
Loading...
Searching...
No Matches

◆ inoise16() [2/2]

fl::u16 inoise16 ( fl::u32 x,
fl::u32 y,
fl::u32 z,
fl::u32 t )

Definition at line 463 of file noise.cpp.hpp.

463 {
464 fl::i32 ans = inoise16_raw(x,y,z,t);
465 ans = ans + 19052L;
466 fl::u32 pan = ans;
467 // pan = (ans * 220L) >> 7. That's the same as:
468 // pan = (ans * 440L) >> 8. And this way avoids a 7X four-byte shift-loop on AVR.
469 // Identical math, except for the highest bit, which we don't care about anyway,
470 // since we're returning the 'middle' 16 out of a 32-bit value anyway.
471 pan *= 440L;
472 return (pan>>8);
473
474 // return scale16by8(pan,220)<<1;
475 // return ((inoise16_raw(x,y,z)+19052)*220)>>7;
476 // return scale16by8(inoise16_raw(x,y,z)+19052,220)<<1;
477}
int y
Definition simple.h:93
int x
Definition simple.h:92
uint32_t z[NUM_LAYERS]
Definition Fire2023.h:93
static uint32_t t
Definition Luminova.h:55
fl::i16 inoise16_raw(fl::u32 x, fl::u32 y, fl::u32 z) FL_NO_EXCEPT
16-bit, fixed point implementation of Perlin's noise without scaling.

References FL_NO_EXCEPT, inoise16_raw(), t, x, y, and z.

Referenced by fl::PerlinParticlePunch::circleNoiseGen(), Fire2023(), getFirePaletteIndex(), getPaletteIndex(), getPaletteIndex(), loop(), fl::noiseCylinderCRGB(), fl::noiseCylinderHSV16(), fl::noiseRingCRGB(), fl::noiseRingHSV16(), fl::noiseSphereCRGB(), fl::noiseSphereHSV16(), showGenerative(), and NoiseGenerator::Value().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: