23 x = fX; |
23 x = fX; |
24 y = fY; |
24 y = fY; |
25 z = fZ; |
25 z = fZ; |
26 } |
26 } |
27 |
27 |
|
28 // ========================================================================= |
28 void move (vertex other) { |
29 void move (vertex other) { |
29 x += other.x; |
30 x += other.x; |
30 y += other.y; |
31 y += other.y; |
31 z += other.z; |
32 z += other.z; |
32 } |
33 } |
33 |
34 |
34 // ========================================================================= |
35 // ========================================================================= |
35 vertex& operator+= (vertex other) { |
36 vertex& operator+= (vertex other) { |
36 move (other); |
37 move (other); |
|
38 return *this; |
|
39 } |
|
40 |
|
41 // ========================================================================= |
|
42 vertex operator/ (const double d) { |
|
43 vertex other (*this); |
|
44 return other /= d; |
|
45 } |
|
46 |
|
47 // ========================================================================= |
|
48 vertex& operator/= (const double d) { |
|
49 x /= d; |
|
50 y /= d; |
|
51 z /= d; |
37 return *this; |
52 return *this; |
38 } |
53 } |
39 |
54 |
40 // ========================================================================= |
55 // ========================================================================= |
41 vertex operator- () const { |
56 vertex operator- () const { |