28 lines
No EOL
394 B
C++
28 lines
No EOL
394 B
C++
#include "ComplexNumber.h"
|
|
|
|
ComplexNumber::ComplexNumber(double real, double imaginary)
|
|
: mReal(real),
|
|
mImaginary(imaginary)
|
|
{
|
|
|
|
}
|
|
|
|
double ComplexNumber::getReal() const
|
|
{
|
|
return mReal;
|
|
}
|
|
|
|
double ComplexNumber::getImaginary() const
|
|
{
|
|
return mImaginary;
|
|
}
|
|
|
|
void ComplexNumber::setReal(double value)
|
|
{
|
|
mReal = value;
|
|
}
|
|
|
|
void ComplexNumber::setImaginary(double value)
|
|
{
|
|
mImaginary = value;
|
|
} |