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