src/Chippyash/Math/Type/Calculator/Native.php
public function complexAdd(ComplexType $a, ComplexType $b)
    {
        $r = $this->rationalAdd($a->r(), $b->r());
        $i = $this->rationalAdd($a->i(), $b->i());
        return ComplexTypeFactory::create($r, $i);
    }
public function complexAdd(ComplexType $a, ComplexType $b)
    {
        $r = $this->rationalAdd($a->r(), $b->r());
        $i = $this->rationalAdd($a->i(), $b->i());
        return ComplexTypeFactory::create($r, $i);
    }
public function complexAdd ( ComplexType $ a , ComplexType $ b ) { $ r = $ this -> rationalAdd ( $ a -> r ( ) , $ b -> r ( ) ) ; $ i = $ this -> rationalAdd ( $ a -> i ( ) , $ b -> i ( ) ) ; return ComplexTypeFactory :: create ( $ r , $ i ) ; }
Complex number addition

@param ComplexType $a first operand
@param ComplexType $b second operand

@return ComplexType
Complex number addition