Changeset 2217:4a10a45d55f6 in lemon-0.x
- Timestamp:
- 09/14/06 21:58:29 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2947
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/dim2.h
r2214 r2217 74 74 Point(T a, T b) : x(a), y(b) { } 75 75 76 ///Size of vector 76 ///The dimension of the vector. 77 78 ///This class give back always 2. 79 /// 77 80 int size() const { return 2; } 78 81 79 82 ///Subscripting operator 83 84 ///\c p[0] is \c p.x and \c p[1] is \c p.y 85 /// 80 86 T& operator[](int idx) { return idx == 0 ? x : y; } 81 87 82 88 ///Const subscripting operator 89 90 ///\c p[0] is \c p.x and \c p[1] is \c p.y 91 /// 83 92 const T& operator[](int idx) const { return idx == 0 ? x : y; } 84 93
Note: See TracChangeset
for help on using the changeset viewer.