stuff-from-scratch/plugins/math/ComplexNumber.h

21 lines
317 B
C
Raw Permalink Normal View History

#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;
void setReal(double value);
void setImaginary(double value);
private:
double mReal{ 0.0 };
double mImaginary{ 0.0 };
};