33 if (range.interval > 0)
34 return (
static_cast<int> ((range.end - range.start) / range.interval) + 1);
41 const auto& range = getNormalisableRange();
42 return range.convertTo0to1 (range.snapToLegalValue (v));
47 const auto& range = getNormalisableRange();
48 return range.snapToLegalValue (range.convertFrom0to1 (
jlimit (0.0f, 1.0f, v)));
static int getDefaultNumParameterSteps() noexcept
Returns the default number of steps for a parameter.
float convertTo0to1(float v) const noexcept
Normalises and snaps a value based on the normalisable range.
int getNumSteps() const override
Returns the number of steps for this parameter based on the normalisable range's interval.
virtual const NormalisableRange< float > & getNormalisableRange() const =0
Returns the range of values that the parameter can take.
float convertFrom0to1(float v) const noexcept
Denormalises and snaps a value based on the normalisable range.
Type jlimit(Type lowerLimit, Type upperLimit, Type valueToConstrain) noexcept
Constrains a value to keep it within a given range.