3
Answers

Convert interval

none

none

15y
2.7k
1
I have a TrackBar with values [-100,100]

this values are used in some function that accept float values between 0 and 20 (I guess)..

when TrackBar.Value = [-100, 1]
that value must converted to [0.0, 1.0]

when TrackBar.Value = ( 1, 100]
that value must converted to [1.1, 20]

what`s the formula to convert that?
I`m working at it from a while... and nothing...
Answers (3)