Image fillAmount from 0.9 to 1
When we use fillAmount we set a value from 0 to 1.
Lets say you have a health bar range 0 to 100. You divide it by 100 then you get the value for fillAmount.
In my case I have a variable that goes from 90 to 100 but I'm trying to get that when the value is 90, the fillAmount value is 0, and when the value is 100, fillAmount is 1.
IE:
someVariable = 90 fillAmount = 0
some variable = 95 fillAmount = 50
To be honest I think I'm overthinking it, I feel like it's something extremely easy to do but I can't get my head around it.
Thanks!
Comment