[FR] Range::getProportionalValue(float proportion)


In analogy with what is found in other parts of JUCE (Line, Rectangle), it would be nice if Range had a method that, given a proportional position along the length of the range, returns the corresponding value:

  • 0 -> start value
  • 1 -> end value
  • 0.5 -> middle value
  • and so on…


But that is the job of NormalisableRange, isn’t it?
You can get a Range from a NormalisableRange using NormalisableRange< ValueType >::getRange () const, or did I miss something?

I don’t know exactly the difference, maybe they could be merged at some point?


Yes, I thought about that but switching to a NormalizableRange seemed overkill in my case…