@@ 2137-2141 (lines=5) @@ | ||
2134 | foreach ($aArgs as $arg) { |
|
2135 | $parsedComplex = self::_parseComplex($arg); |
|
2136 | ||
2137 | if ($activeSuffix == '') { |
|
2138 | $activeSuffix = $parsedComplex['suffix']; |
|
2139 | } elseif (($parsedComplex['suffix'] != '') && ($activeSuffix != $parsedComplex['suffix'])) { |
|
2140 | return PHPExcel_Calculation_Functions::VALUE(); |
|
2141 | } |
|
2142 | ||
2143 | $returnValue['real'] += $parsedComplex['real']; |
|
2144 | $returnValue['imaginary'] += $parsedComplex['imaginary']; |
|
@@ 2174-2178 (lines=5) @@ | ||
2171 | $parsedComplex = self::_parseComplex($arg); |
|
2172 | ||
2173 | $workValue = $returnValue; |
|
2174 | if (($parsedComplex['suffix'] != '') && ($activeSuffix == '')) { |
|
2175 | $activeSuffix = $parsedComplex['suffix']; |
|
2176 | } elseif (($parsedComplex['suffix'] != '') && ($activeSuffix != $parsedComplex['suffix'])) { |
|
2177 | return PHPExcel_Calculation_Functions::NaN(); |
|
2178 | } |
|
2179 | $returnValue['real'] = ($workValue['real'] * $parsedComplex['real']) - ($workValue['imaginary'] * $parsedComplex['imaginary']); |
|
2180 | $returnValue['imaginary'] = ($workValue['real'] * $parsedComplex['imaginary']) + ($workValue['imaginary'] * $parsedComplex['real']); |
|
2181 | } |