Nanako
1
Ok, i have a normalised number (in the range 0 - 1) which represents a point along a line. Or a percentage.
How do i convert this into a number in the range 0.5 - 2, making it represent the same point/percentage along that scale?
i’m sure this is pretty basic math, but my brain seems to not be working today
Almost the same as the previous answer but a bit more reliable.
Your percentage value will be normalized in 0 … 1 range with this call:
float result = Mathf.Lerp(0.5, 2.0, yourPercentage);
float valueChange(float value,float newMin,float newMax){
return newMin + value * (newMax - newMin);
}