equal
deleted
inserted
replaced
15 T _x,_y; |
15 T _x,_y; |
16 |
16 |
17 public: |
17 public: |
18 |
18 |
19 ///Default constructor: both coordinates become 0 |
19 ///Default constructor: both coordinates become 0 |
20 xy() { _x=_y=0; } |
20 xy() : _x(0), _y(0 ){ /*_x=_y=0;*/ } |
21 |
21 |
22 ///Constructing from coordinates |
22 ///Constructing from coordinates |
23 xy(T a, T b) { _x=a; _y=b; } |
23 xy(T a, T b) : _x(a), _x(b) { /*_x=a; _y=b;*/ } |
24 |
24 |
25 ///Gives back the x coordinate |
25 ///Gives back the x coordinate |
26 T x(){ |
26 T x(){ |
27 return _x; |
27 return _x; |
28 }; |
28 }; |