For Better Performance Please Use Chrome or Firefox Web Browser

35-1

// Mokhtalet.cpp: implementation of the Mokhtalet class.
//
//////////////////////////////////////////////////////////////////////

#include<math.h>
#include "Mokhtalet.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

Mokhtalet::Mokhtalet()
{
	i_ = r_ = 0;
}

Mokhtalet::Mokhtalet(double initR, 
					 double initI)
{
	i_ = initI;
	r_ = initR;
}

Mokhtalet::~Mokhtalet()
{
}

double Mokhtalet::andaze() const
{
	return sqrt(r_*r_ + i_*i_);
}

Mokhtalet Mokhtalet::jamMosavi(const Mokhtalet jamKonBahash)
{
	r_ += jamKonBahash.ghesmateHaghighi();
	i_ += jamKonBahash.ghesmateMajazi();
	return (*this);
}

Mokhtalet Mokhtalet::operator+= (const Mokhtalet jamKonBahash)
{
	r_ += jamKonBahash.ghesmateHaghighi();
	i_ += jamKonBahash.ghesmateMajazi();
	return (*this);
}

تحت نظارت وف ایرانی