tags:

views:

41

answers:

1

Hi,

I'm having trouble solving a simple maths problem. My algebra skills are pretty embaressing.

I've programmed a volume slider to give me a decibel gain value.

db_gain=(x * (8 / 5)) - 90;

For the above I know what x is (the slider thumb position) and I use it to find the db_gain.

How can I switch this around so that given the db_gain I find x (the thumb position)

+6  A: 
   db_gain = (x * (8/5)) - 90
=> db_gain + 90 = x * (8/5)
=> (5/8) * (db_gain + 90) = x
Chris
thankyou very much
dubbeat