1.1 --- a/src/lemon/xy.h Tue Jan 04 17:05:20 2005 +0000
1.2 +++ b/src/lemon/xy.h Tue Jan 04 17:06:20 2005 +0000
1.3 @@ -195,6 +195,36 @@
1.4 return top_right;
1.5 };
1.6
1.7 + ///Gives back the bottom right corner (if the bounding box is empty, then the return value is not defined)
1.8 + xy<T> bottomRight() const {
1.9 + return xy<T>(top_right.x,bottom_left.y);
1.10 + };
1.11 +
1.12 + ///Gives back the top left corner (if the bounding box is empty, then the return value is not defined)
1.13 + xy<T> topLeft() const {
1.14 + return xy<T>(bottom_left.x,top_right.y);
1.15 + };
1.16 +
1.17 + ///Gives back the bottom of the box (if the bounding box is empty, then the return value is not defined)
1.18 + T bottom() const {
1.19 + return bottom_left.y;
1.20 + };
1.21 +
1.22 + ///Gives back the top of the box (if the bounding box is empty, then the return value is not defined)
1.23 + T top() const {
1.24 + return top_right.y;
1.25 + };
1.26 +
1.27 + ///Gives back the left side of the box (if the bounding box is empty, then the return value is not defined)
1.28 + T left() const {
1.29 + return bottom_left.x;
1.30 + };
1.31 +
1.32 + ///Gives back the right side of the box (if the bounding box is empty, then the return value is not defined)
1.33 + T right() const {
1.34 + return top_right.x;
1.35 + };
1.36 +
1.37 ///Checks whether a point is inside a bounding box
1.38 bool inside(const xy<T>& u){
1.39 if (_empty)