Solving simultaneous equations

Posted by Milo on Stack Overflow See other posts from Stack Overflow or by Milo
Published on 2011-01-01T19:37:23Z Indexed on 2011/01/01 19:54 UTC
Read the original article Hit count: 260

Filed under:
|

Here is my problem:

Given x, y, z and ratio where z is known and ratio is known and is a float representing a relative value, I need to find x and y.

I know that:

x / y == ratio
y - x == z

What I'm trying to do is make my own scroll pane and I'm figuring out the scrollbar parameters.

So for example,

If the scrollbar must be able to scroll 100 values (z) and the thumb must consume 80% of the bar (ratio = 0.8) then x would be 400 and y would be 500.

Thanks

© Stack Overflow or respective owner

Related posts about algorithm

Related posts about math