C# method to scale values?
Posted
by John S
on Stack Overflow
See other posts from Stack Overflow
or by John S
Published on 2010-04-20T12:51:30Z
Indexed on
2010/04/20
12:53 UTC
Read the original article
Hit count: 261
Hello, I have a value range from 0 to 255.
There is a method that returns an array with a min and max values within this range, i.e: 13, 15, 20, 27, 50 ... 240 where 13 is the min and 240 is the max
I need to scale these values so that 13 becomes 0 and 240 becomes 255 and scale all the other values between them proportionally.
Is there any C# method that does that?
thanks!
© Stack Overflow or respective owner