Results 1 to 2 of 2

Thread: I am really horrible at math!! [Resolved]

  1. #1

    Thread Starter
    Lively Member Xman51's Avatar
    Join Date
    Mar 2005
    Location
    Tampa, FL USA
    Posts
    88

    Resolved 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??
    Last edited by Xman51; Apr 22nd, 2005 at 09:10 AM. Reason: resolved
    Xman51
    Area 51


  2. #2

    Thread Starter
    Lively Member Xman51's Avatar
    Join Date
    Mar 2005
    Location
    Tampa, FL USA
    Posts
    88

    Resolved 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:
    1. 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!!!

    Thanks anyway math gods...
    Xman51
    Area 51


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width