(Normalisable)Range start greater than end?



Why can’t I use the Range and NormalisableRange classes where the start value is higher than the end value? The AudioParameterFloat also requires the start value to be lower then the end value. Can someone explain to me why these classes work this way?




Start higher than the end is used for “invalid range” in the JUCE classes. Also it doesn’t mathematically make sense to have a range/interval that has the start higher than the end. If you just need an arbitrary number pair with no additional semantics, you might consider using std::pair<T,T>.


Ok, thank you.
So, it is not possible to create an AudioParameterFloat with a startvalue that is higher then the end value?