equal
deleted
inserted
replaced
6 #ifndef VECTOR_H |
6 #ifndef VECTOR_H |
7 #define VECTOR_H |
7 #define VECTOR_H |
8 |
8 |
9 #include <object.h> |
9 #include <object.h> |
10 |
10 |
11 class Vector:public Object { |
11 namespace algebra { |
12 public: |
12 class Vector:public Object { |
13 enum Mode { DEG, RAD, GRAD }; |
13 public: |
|
14 enum Mode { DEG, RAD, GRAD }; |
14 |
15 |
15 Vector (int xx = 0, int yy = 0); |
16 Vector (int xx = 0, int yy = 0); |
16 virtual ~ Vector (); |
17 virtual ~ Vector (); |
17 |
18 |
18 int X (); |
19 int X (); |
19 int Y (); |
20 int Y (); |
20 |
21 |
21 Vector operator+ (Vector&); |
22 Vector operator+ (Vector &); |
22 Vector operator- (Vector&); |
23 Vector operator- (Vector &); |
23 double abs (); |
24 double abs (); |
24 |
25 |
25 void vector (); |
26 void vector (); |
26 double angle (Vector&); |
27 double angle (Vector &); |
27 void setMode (Mode m = RAD); |
28 void setMode (Mode m = RAD); |
28 |
29 |
29 private: |
30 private: |
30 Mode mode; |
31 Mode mode; |
31 int x; |
32 int x; |
32 int y; |
33 int y; |
33 }; |
34 }; |
|
35 } |
34 #endif |
36 #endif |