Question

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)

Was it helpful?

Solution

   db_gain = (x * (8/5)) - 90
=> db_gain + 90 = x * (8/5)
=> (5/8) * (db_gain + 90) = x
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top