Fixed types, fixed complex notation

This commit is contained in:
Balhau 2018-12-02 20:50:38 +00:00
parent 291d0f1bc8
commit 11fc1a33d8
2 changed files with 5 additions and 5 deletions

View file

@ -3,7 +3,7 @@
/** /**
* Constructor implementation * Constructor implementation
*/ */
Core::Bmath::Complex::Complex(Long real,Long imaginary){ Core::Bmath::Complex::Complex(Double real,Double imaginary){
this->real=real; this->real=real;
this->imaginary=imaginary; this->imaginary=imaginary;
}; };

View file

@ -10,18 +10,18 @@ namespace Core{
namespace Bmath{ namespace Bmath{
class Complex{ class Complex{
private: private:
Long real; Double real;
Long imaginary; Double imaginary;
public: public:
Complex(Long real,Long imaginary); Complex(Double real,Double imaginary);
Complex& operator+=(const Complex& rightOp); Complex& operator+=(const Complex& rightOp);
Complex operator+(const Complex &rightOp); Complex operator+(const Complex &rightOp);
Complex operator*(const Complex &rightOp); Complex operator*(const Complex &rightOp);
//Overload to enable toString operations //Overload to enable toString operations
friend std::ostream& operator<<(std::ostream &stream, Core::Bmath::Complex const &c){ friend std::ostream& operator<<(std::ostream &stream, Core::Bmath::Complex const &c){
return stream << "(" << c.real << ", " << c.imaginary << "i)"; return stream << "(" << c.real << "+" << c.imaginary << "i)";
} }
}; };
}; };