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

◆ step

float float float float fl::UISlider::step
Initial value:
= -1.f)
: mImpl(name, value, min, max, step), mListener(this) {}
float value() const { return mImpl.value(); }
float value_normalized() const {
float min = mImpl.getMin();
float max = mImpl.getMax();
if (ALMOST_EQUAL(max, min, 0.0001f)) {
return 0;
}
return (value() - min) / (max - min);
}
float getMax() const { return mImpl.getMax(); }
float getMin() const { return mImpl.getMin(); }
void setValue(float value)
Listener mListener
Definition ui.h:126
float float float float step
Definition ui.h:48
float value
Definition ui.h:47
UISliderImpl mImpl
Definition ui.h:97
float float float max
Definition ui.h:48
float float min
Definition ui.h:47
float getMax() const
Definition ui_impl.h:70
float getMin() const
Definition ui_impl.h:71
#define ALMOST_EQUAL(a, b, small)
Definition math_macros.h:59

Definition at line 48 of file ui.h.

49 : mImpl(name, value, min, max, step), mListener(this) {}
50 float value() const { return mImpl.value(); }
51 float value_normalized() const {
52 float min = mImpl.getMin();
53 float max = mImpl.getMax();
54 if (ALMOST_EQUAL(max, min, 0.0001f)) {
55 return 0;
56 }
57 return (value() - min) / (max - min);
58 }
59 float getMax() const { return mImpl.getMax(); }
60 float getMin() const { return mImpl.getMin(); }