How to get value to be from 0 to 1?
<p>I tried to look for an answer for this problem but I guess nobody has needed something like this or it's something super simple that I just can't get my head around. So:</p>

<p>I have a value that changes from 45 to 20.</p>

<p>I'd need a value that goes from 0 to 1 in same time as 45 goes to 20. I know that 45 - 20 = 25 and that would be my 100% and hence the number 1.</p>

<p>I'd implement this in Lerp value like this:</p>

<pre><code>public float minHeight = 10.0f;
public float maxHeight = 30.0f;
public float convertedValue;
</code></pre>

<p>convertedValue = ??? (Something like 45 - 20 = 25 = 100%) * 0.01;</p>

<pre><code>newValue = Mathf.Lerp(minHeight, maxHeight, convertedValue);
</code></pre>

<p>Hopefully someone can help me. Im fairly new to coding and I was just wondering if this is possible. Thanks for your time!</p>
