64 float getf(
size_t x)
const;
69 int8_t
geti8(
size_t x)
const {
return static_cast<int8_t
>(
geti16(
x) >> 8); }
81 uint16_t v2 =
static_cast<uint16_t
>(value);
83 return static_cast<uint8_t
>(v2 >> 8);
85 return static_cast<uint8_t
>(
86 ((
static_cast<uint16_t
>(value) + 32768)) >> 8);
91 bool has(
size_t x)
const;
95 void set(
size_t x,
float value);
141 float getf(
size_t x,
size_t y)
const;
145 int16_t
geti16(
size_t x,
size_t y)
const;
149 return static_cast<int8_t
>(
geti16(
x,
y) >> 8);
160 uint16_t v2 =
static_cast<uint16_t
>(value);
162 return static_cast<uint8_t
>(v2 >> 8);
164 return static_cast<uint8_t
>(
165 ((
static_cast<uint16_t
>(value) + 32768)) >> 8);
172 bool has(
size_t x,
size_t y)
const;
177 void setf(
size_t x,
size_t y,
float value);
179 void seti16(
size_t x,
size_t y, int16_t value);
UISlider dampening("Dampening", 6.0f, 0.0f, 10.0f, 0.1f)
void set(size_t x, float value)
int16_t geti16(size_t x) const
int getDampenening() const
void setHalfDuplex(bool on)
int16_t geti16Previous(size_t x) const
int8_t geti8(size_t x) const
uint8_t getu8(size_t x) const
fl::vector< int16_t > grid2
void setSpeed(float something)
fl::vector< int16_t > grid1
bool getHalfDuplex() const
float getf(size_t x) const
~WaveSimulation1D_Real()=default
WaveSimulation1D_Real(uint32_t length, float speed=0.16f, int dampening=6)
void setDampening(int damp)
int16_t geti16Previous(size_t x, size_t y) const
bool getHalfDuplex() const
int8_t geti8(size_t x, size_t y) const
~WaveSimulation2D_Real()=default
bool has(size_t x, size_t y) const
fl::vector< int16_t, fl::allocator_psram< int16_t > > grid2
void setHalfDuplex(bool on)
void setf(size_t x, size_t y, float value)
int16_t geti16(size_t x, size_t y) const
int getDampenening() const
void setSpeed(float something)
void seti16(size_t x, size_t y, int16_t value)
void setXCylindrical(bool on)
uint8_t getu8(size_t x, size_t y) const
WaveSimulation2D_Real(uint32_t W, uint32_t H, float speed=0.16f, float dampening=6.0f)
uint32_t getWidth() const
uint32_t getHeight() const
fl::vector< int16_t, fl::allocator_psram< int16_t > > grid1
float getf(size_t x, size_t y) const
void setDampening(int damp)
Implements the FastLED namespace macros.
float fixed_to_float(int16_t f)
int16_t float_to_fixed(float f)
HeapVector< T, Allocator > vector
Implements a simple red square effect for 2D LED grids.