Scale to a range

If i have a float in range -1 to 1, how to scale it to be from 0 to 1?

Thanks for your time.
add 1 to get the lower bound to zero
divide by 2 to adjust the scale.
Thanks.
Topic archived. No new replies allowed.