title: How to convert a neg mixed number to improper fraction?
body: <p>I have this method in my fraction class,</p>
  
  <pre><code>public void toImproper() {
      if (denom == 0) {
  
          denom = 1;
      }
      num = (denom * coeff) + num;
      coeff = 0;
  
  }
  </code></pre>
  
  <p>I have been using some test cases in this fraction calculator I am making such as -1_1/2 * 2 but I am getting 1 as my answer (next paragraph clears this up).</p>
  
  <p>At first I put it into improper form right as I get the input, but making it improper AGAIN is giving me some problems. It is making -1_1/2 = -1/2 because of my method. -1_1/2 in improper form should be -3/2 but my method give -1/2. This is because it multiplies the coefficient by the denominator then adds the numerator. So for the numerator you get (-1 * 2) + 1. How can I fix this? I thought of using Math.abs(); but then it makes all negatives positive.</p>
  
  <p>Thanks!</p>