19 lines
286 B
C
19 lines
286 B
C
|
#pragma once
|
||
|
|
||
|
class ComplexNumber
|
||
|
{
|
||
|
public:
|
||
|
ComplexNumber(double real = 0.0, double imaginary = 0.0);
|
||
|
|
||
|
double getReal() const;
|
||
|
|
||
|
double getImaginary() const;
|
||
|
|
||
|
void setReal(double value);
|
||
|
|
||
|
void setImaginary(double value);
|
||
|
|
||
|
private:
|
||
|
double mReal{ 0.0 };
|
||
|
double mImaginary{ 0.0 };
|
||
|
};
|