Difficult Maths Question

Lets say I have a number value which ranges from 0 to 1 (Value 1) and I’d like to create a second number value (Value 2) which would have a value of 0.5 when Value 1 is 0.1 or lower and would go up to 1 as Value 1 goes up to 1. Here is an illustration of what I mean:

What would be the formula for this? I tried a few things, but none of them worked.

3 Likes

math.max(0.5, 0.5 + (value1-0.1)*(0.5/0.9))

Kinda hard to explain this without just showing a way it can be done. Hope you are able to decipher how this works. If not feel free to ask about anything you don’t understand.

8 Likes