title: Solving simultaneous equations
body: <p>Here is my problem:</p>
  
  <p>Given <code>x</code>, <code>y</code>, <code>z</code> and <code>ratio</code> where <code>z</code> is known and <code>ratio</code> is known and is a float representing a relative value, I need to find <code>x</code> and <code>y</code>.</p>
  
  <p>I know that:</p>
  
  <pre><code>x / y == ratio
  y - x == z
  </code></pre>
  
  <p>What I'm trying to do is make my own scroll pane and I'm figuring out the scrollbar parameters.</p>
  
  <p>So for example,</p>
  
  <p>If the scrollbar must be able to scroll 100 values (<code>z</code>) and the thumb must consume 80% of the bar (<code>ratio</code> = 0.8) then <code>x</code> would be 400 and <code>y</code> would be 500.</p>
  
  <p>Thanks</p>