cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Scale to a range
Scale to a range
May 16, 2012 at 5:24pm UTC
morando
(163)
If i have a float in range -1 to 1, how to scale it to be from 0 to 1?
Thanks for your time.
May 16, 2012 at 5:25pm UTC
Disch
(13742)
add 1 to get the lower bound to zero
divide by 2 to adjust the scale.
May 16, 2012 at 5:31pm UTC
morando
(163)
Thanks.
Topic archived. No new replies allowed.