title: Cyclomatic complexity when if conditions are combined
body: <p>I would like to compute the cyclomatic complexity of below code.</p>
  
  <pre><code>    int test(int a, int b)
      {
            int result = 0;
            if (a == 0 &amp;&amp; b == 0)
                result = -1;
            else
                result = a * b;
  
            return result;
      }
  </code></pre>
  
  <p>Mathwork's Polyspace tool calculates a value of 2.
  Visual studio and Metrics plugin for Eclipse shows 3. Which is correct?</p>