title: adding or substracting doubles gives wrong result
body: <pre><code>if (CIElchOpposite[2] &lt; 180.0) {
      CIElchOpposite[2] = CIElchOpposite[2] + 180;
  } else {
      CIElchOpposite[2] = CIElchOpposite[2] - 180;
  }
  </code></pre>
  
  <p>For a given <code>CIElchOpposite[2] = 82;</code> the return result is <code>180</code> when it should be <code>262</code>. </p>
  
  <p><code>CIELchOpposite</code> is <code>double []</code>. </p>
  
  <p>It should be really easy but no  matter what the operation is not done correctly.<br>
  This is the entire method, mapping a CIELab colour to CIELch space, calculating the opposite colour (just adding or substracting 180º) and then converting it back to CIELab. The mapping has been checked independently and works correctly.</p>
  
  <pre><code>double CIElch[] = MapFromCIElabtoCIElch
              .mapLabToLch(inputColorOneCIELAB);
      double CIElchOpposite[] = new double[3];
      CIElchOpposite[0] = CIElch[0];
      CIElchOpposite[1] = CIElch[1];
  
      if (CIElchOpposite[2] &lt; 180.0) {
          CIElchOpposite[2] = CIElchOpposite[2] + 180;
      } else {
          CIElchOpposite[2] = CIElchOpposite[2] - 180;
      }
  
      double[] CIElabOpposite = new double[3];
      CIElabOpposite = MapFromCIElabtoCIElch.mapLchToLab(CIElchOpposite);
  </code></pre>