src/Alg/Math/ComplexNumber.php
public function add( $complex )
	{
		$a	= $this->getRealPart();
		$b	= $this->getImagePart();
		$c	= $complex->getRealPart();
		$d	= $complex->getImagePart();
		$real	= $a + $c;
		$image	= $b + $d;
		return new ComplexNumber( $real, $image );
	}
public function add( $complex )
	{
		$a	= $this->getRealPart();
		$b	= $this->getImagePart();
		$c	= $complex->getRealPart();
		$d	= $complex->getImagePart();
		$real	= $a + $c;
		$image	= $b + $d;
		return new ComplexNumber( $real, $image );
	}
public function add ( $ complex ) { $ a = $ this -> getRealPart ( ) ; $ b = $ this -> getImagePart ( ) ; $ c = $ complex -> getRealPart ( ) ; $ d = $ complex -> getImagePart ( ) ; $ real = $ a + $ c ; $ image = $ b + $ d ; return new ComplexNumber ( $ real , $ image ) ; }
Addition of complex numbers.
@access		public
@param		ComplexNumber	$complex		Complex number to be added
@return		ComplexNumber
Addition of complex numbers .