Fixed types, fixed complex notation
This commit is contained in:
parent
291d0f1bc8
commit
11fc1a33d8
2 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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)";
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue