Скачиваний:
2
Добавлен:
25.05.2014
Размер:
972 б
Скачать
#include "COMP.H"

#ifndef _COMP_TA_CPP_12230482543485732
#define _COMP_TA_CPP_12230482543485732

      TComplex::TComplex    (float Re, float Ima)         //Constructor;
{
   R=Re;
   Im=Ima;
};

float TComplex::Image       ()                            //Get Image part;
{
   return Im;
};

float TComplex::Real        ()                            //Get Real  part;
{
   return R;
};

int   TComplex::SetImage    (float I)                     //Set Image part;
{
   Im=I;
   return 0;
};

int   TComplex::SetReal     (float Re)                    //Set Real  part;
{
   R=Re;
   return 0;
};

int   TComplex::operator == (TComplex c)                  //Operator ==
{
    if (c.Real()==R && c.Image()==Im)   return 1;
    return 0;
};

int   TComplex::operator != (TComplex c)                  //Operator !=
{
    if (c.Real()==R && c.Image()==Im)   return 0;
    return 1;
};




#endif //_COMP_TA_CPP_12230482543485732
Соседние файлы в папке Zad1