2023-01-09 17:31:13 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
class ComplexNumber
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ComplexNumber(double real = 0.0, double imaginary = 0.0);
|
|
|
|
|
|
|
|
double getReal() const;
|
|
|
|
|
|
|
|
double getImaginary() const;
|
|
|
|
|
2023-01-26 11:27:35 +00:00
|
|
|
double getMagnitude() const;
|
|
|
|
|
2023-01-09 17:31:13 +00:00
|
|
|
void setReal(double value);
|
|
|
|
|
|
|
|
void setImaginary(double value);
|
|
|
|
|
|
|
|
private:
|
|
|
|
double mReal{ 0.0 };
|
|
|
|
double mImaginary{ 0.0 };
|
|
|
|
};
|