From 11fc1a33d80df8c0bb55e4c3445aff69715b1480 Mon Sep 17 00:00:00 2001 From: Balhau Date: Sun, 2 Dec 2018 20:50:38 +0000 Subject: [PATCH] Fixed types, fixed complex notation --- src/core/bmath/complex.cpp | 2 +- src/core/bmath/complex.hpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/bmath/complex.cpp b/src/core/bmath/complex.cpp index d71cfef..7a209b9 100644 --- a/src/core/bmath/complex.cpp +++ b/src/core/bmath/complex.cpp @@ -3,7 +3,7 @@ /** * Constructor implementation */ -Core::Bmath::Complex::Complex(Long real,Long imaginary){ +Core::Bmath::Complex::Complex(Double real,Double imaginary){ this->real=real; this->imaginary=imaginary; }; diff --git a/src/core/bmath/complex.hpp b/src/core/bmath/complex.hpp index 06d3e58..be145ec 100644 --- a/src/core/bmath/complex.hpp +++ b/src/core/bmath/complex.hpp @@ -10,18 +10,18 @@ namespace Core{ namespace Bmath{ class Complex{ private: - Long real; - Long imaginary; + Double real; + Double imaginary; 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); //Overload to enable toString operations 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)"; } }; };