I am really horrible at math!! [Resolved]
ok, here is the problem...
I have 2 sets of numbers.
First set:
Minimum = 144
Maximum = 232
Difference = 88
Second Set:
Minimum = -4000
Maximum = 0
Difference = 4000
Minimums, maximums and differences are relational. I want to have it so that when the left property of a control on a form is at minimum (144) it returns the value of -4000 and as you drag the control left across the form it calculates the difference for the second set, so that when the left is at maximum (232) it returns the maximum in the second set (0).
NOTE: I already have the controls dragging properly. All I need is the mathematics required to return the second set of numbers.
Can anyone help?? :confused:
Re: I am really horrible at math!!
I guess i am not that horrible with math...I fugured it out on my own...
VB Code:
intvol = (((imgVolume.Left - 144) / 88) * 4000) - 4000
This is Current position minus 144 (Difference between location on the form and 0) divided by the difference between the minimum number and the maximum number of the first set multiplied by the difference between the minimum and maximum numbers of the second set minus the minumum number of the second set.
whew...that scrambled my brain to high heaven!!! :sick:
Thanks anyway math gods... :D