hmm i don't know what you want to me to?
Hi all, I am just looking for the generic name of a mathematical function that will return the ratio of a reference value between a supplied low and high limit. This is probably best illustrated by example:
1st value is reference, second value is low, and third value is high
SomeFunction(5, 0, 10) = 0.5
SomeFunction(12, 10, 20) = 0.2
SomeFunction(40, 20, 40) = 1
Thanks for the replies. Yes, HallsofIvy, you have pinpointed the function I am referring to. Sorry, I don't know math well enough to make it that clear (I could post my C++ code, but didn't know if that would confuse things further). I actually have the math behind the function figured out, but I don't know what to name it. I just assumed, with how much I use it, that there would be a proper mathematical name for it as I am sure many others have developed such a function.
In my use of it, I have named it RatioInRange(), but if there is an official name, I would prefer to use it so that others who make use of my library will recognize the function by name, assuming there is a proper name for it.
I also have a Blend() that reverses this by taking a ratio, a low and high, and converting it to a value in between the limits. I would like a proper name for this function too if there is one.
e.g. Blend(0.5, 0, 10) = 5