I have a float that goes from 1 to 0 .Im trying to make it so that the order is reversed and scaled so it goes from 0 to -80
Just wondering if there is a straight forward way to do this?
I have a float that goes from 1 to 0 .Im trying to make it so that the order is reversed and scaled so it goes from 0 to -80
Just wondering if there is a straight forward way to do this?
Copyright © 2021 JogjaFile Inc.
Say that your value is $x$ in a value between 1 and 0. We can reverse the order by taking $1-x$ instead.
Multiply this by $-80$ to get a number from 0 to -80.
In other words:
$$(1-x) \cdot (-80)$$ is in the from 0 to -80.
(The expression can be simplified as $(x-1) \cdot 80$)