solve for x problem [closed]
开发者_如何学Python
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this questionI'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)
db_gain = (x * (8/5)) - 90
=> db_gain + 90 = x * (8/5)
=> (5/8) * (db_gain + 90) = x
精彩评论