Thursday, 15 August 2013

Percentage calculation between two values

Percentage calculation between two values

I want to obtain a result between 0.0 and -0.5. I have the values: MIN =
x, MAX = y and IN = x. The value MIN should result in a percent of -0.5%
and MAX 0.0%. For example, if the value of MIN is 240px, the MAX is 600px
and the IN is 360px the IN should result a percent of -0.25%. But I don't
know how to do this calculation.
P.S.: the IN can't be higher than 0.0 or lower than -0.5. P.S.2: sorry
about my english.

No comments:

Post a Comment