-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtcomplex.h
More file actions
31 lines (29 loc) · 812 Bytes
/
tcomplex.h
File metadata and controls
31 lines (29 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef TCOMPLEX_H
#define TCOMPLEX_H
#include "tanumber.h"
#include "ceditor.h"
#include <QString>
class TComplex: public TANumber
{
public:
double Real;
double Img;
TComplex();
TComplex(double real, double img);
TComplex(QString &str);
TComplex* copy() override;
TComplex& operator-() override;
TComplex& operator+(TANumber& B) override;
TComplex& operator-(TANumber& B) override;
TComplex& operator*(TANumber& B) override;
TComplex& operator/(TANumber& B) override;
TComplex& sqr() override;
TComplex& rev() override;
bool operator==(TANumber& other);
bool operator!=(const TComplex &other);
bool isZero() override;
TComplex& get() override;
void set(TANumber& A) override;
CEditor& getRedactor() override;
};
#endif // TCOMPLEX_H