init
This commit is contained in:
24
P4/CKomplex.h
Executable file
24
P4/CKomplex.h
Executable file
@@ -0,0 +1,24 @@
|
||||
class CKomplex {
|
||||
private:
|
||||
double real;
|
||||
double imag;
|
||||
|
||||
public:
|
||||
// Konstruktoren
|
||||
CKomplex();
|
||||
CKomplex(double a, double b);
|
||||
CKomplex(double phi);
|
||||
|
||||
// Methoden zur R<>ckgabe des Real- und Imagin<69>rteils
|
||||
double re() const;
|
||||
double im() const;
|
||||
|
||||
// <20>berladene Operatoren f<>r Addition und Multiplikation
|
||||
CKomplex operator+(const CKomplex& other) const;
|
||||
CKomplex operator-(const CKomplex& other) const;
|
||||
CKomplex operator*(const CKomplex& other) const;
|
||||
CKomplex operator*(double scalar) const;
|
||||
|
||||
// Methode zur Berechnung des Betrags
|
||||
double abs() const;
|
||||
};
|
||||
Reference in New Issue
Block a user