![]() |
fsh::stk
fantastic spatial holophonic synthesis toolkit
|
Represents a value that is bounded by a minimum and maximum. More...
#include <BoundedValue.h>
Public Member Functions | |
BoundedValue (T val={}) | |
Set the initial value. | |
auto | get () const -> T |
Get the value stored in this object. | |
void | set (T val) |
Set a new value, clamping to min/max if necessary. | |
Static Public Attributes | |
static constexpr auto | min = static_cast<T>(MIN) |
Minimum value. | |
static constexpr auto | max = static_cast<T>(MAX) |
Maximum value. | |
Represents a value that is bounded by a minimum and maximum.
Setting a value outside of the bounds will fail gracefully by clamping it to the nearest bound and logging a warning.