Index: lemon/xy.h
===================================================================
--- lemon/xy.h	(revision 2006)
+++ lemon/xy.h	(revision 2157)
@@ -48,4 +48,11 @@
   /// operators.
   ///
+  ///\note As you might have noticed, this class does not follow the
+  ///\ref naming_conv "LEMON Coding Style" (it should be called \c Xy
+  ///according to it). There is a stupid Hungarian proverb, "A kiv&eacute;tel
+  ///er&otilde;s&iacute;ti a szab&aacute;lyt" ("An exception
+  ///reinforces a rule", which is
+  ///actually a mistranslation of the Latin proverb "Exceptio probat regulam").
+  ///This class is an example for that.
   ///\author Attila Bernath
   template<typename T>
@@ -64,5 +71,5 @@
       xy() {}
 
-      ///Constructing the instance from coordinates
+      ///Construct an instance from coordinates
       xy(T a, T b) : x(a), y(b) { }
 
@@ -71,10 +78,10 @@
       template<class TT> xy(const xy<TT> &p) : x(p.x), y(p.y) {}
 
-      ///Gives back the square of the norm of the vector
+      ///Give back the square of the norm of the vector
       T normSquare() const {
         return x*x+y*y;
       }
   
-      ///Increments the left hand side by u
+      ///Increment the left hand side by u
       xy<T>& operator +=(const xy<T>& u) {
         x += u.x;
@@ -83,5 +90,5 @@
       }
   
-      ///Decrements the left hand side by u
+      ///Decrement the left hand side by u
       xy<T>& operator -=(const xy<T>& u) {
         x -= u.x;
@@ -90,5 +97,5 @@
       }
 
-      ///Multiplying the left hand side with a scalar
+      ///Multiply the left hand side with a scalar
       xy<T>& operator *=(const T &u) {
         x *= u;
@@ -97,5 +104,5 @@
       }
 
-      ///Dividing the left hand side by a scalar
+      ///Divide the left hand side by a scalar
       xy<T>& operator /=(const T &u) {
         x /= u;
@@ -104,10 +111,10 @@
       }
   
-      ///Returns the scalar product of two vectors
+      ///Return the scalar product of two vectors
       T operator *(const xy<T>& u) const {
         return x*u.x+y*u.y;
       }
   
-      ///Returns the sum of two vectors
+      ///Return the sum of two vectors
       xy<T> operator+(const xy<T> &u) const {
         xy<T> b=*this;
@@ -115,5 +122,5 @@
       }
 
-      ///Returns the neg of the vectors
+      ///Return the neg of the vectors
       xy<T> operator-() const {
         xy<T> b=*this;
@@ -122,5 +129,5 @@
       }
 
-      ///Returns the difference of two vectors
+      ///Return the difference of two vectors
       xy<T> operator-(const xy<T> &u) const {
         xy<T> b=*this;
@@ -128,5 +135,5 @@
       }
 
-      ///Returns a vector multiplied by a scalar
+      ///Return a vector multiplied by a scalar
       xy<T> operator*(const T &u) const {
         xy<T> b=*this;
@@ -134,5 +141,5 @@
       }
 
-      ///Returns a vector divided by a scalar
+      ///Return a vector divided by a scalar
       xy<T> operator/(const T &u) const {
         xy<T> b=*this;
@@ -140,10 +147,10 @@
       }
 
-      ///Testing equality
+      ///Test equality
       bool operator==(const xy<T> &u) const {
         return (x==u.x) && (y==u.y);
       }
 
-      ///Testing inequality
+      ///Test inequality
       bool operator!=(xy u) const {
         return  (x!=u.x) || (y!=u.y);
@@ -152,7 +159,7 @@
     };
 
-  ///Returns an xy 
-
-  ///Returns an xy
+  ///Return an xy 
+
+  ///Return an xy
   ///\relates xy
   template <typename T>
@@ -161,7 +168,7 @@
   }
 
-  ///Returns a vector multiplied by a scalar
-
-  ///Returns a vector multiplied by a scalar
+  ///Return a vector multiplied by a scalar
+
+  ///Return a vector multiplied by a scalar
   ///\relates xy
   template<typename T> xy<T> operator*(const T &u,const xy<T> &x) {
@@ -220,4 +227,15 @@
   }
 
+  ///Rotate by 180 degrees
+
+  ///Returns its parameter rotated by 180 degrees.
+  ///\relates xy
+  ///
+  template<typename T>
+  inline xy<T> rot180(const xy<T> &z)
+  {
+    return xy<T>(-z.x,-z.y);
+  }
+
   ///Rotate by 270 degrees
 
@@ -247,5 +265,5 @@
       BoundingBox() { _empty = true; }
 
-      ///Constructing the instance from one point
+      ///Construct an instance from one point
       BoundingBox(xy<T> a) { bottom_left=top_right=a; _empty = false; }
 
@@ -255,54 +273,70 @@
       }
 
-      ///Makes the BoundingBox empty
+      ///Make the BoundingBox empty
       void clear() {
         _empty=1;
       }
 
-      ///\brief Gives back the bottom left corner
-      ///(if the bounding box is empty, then the return value is not defined) 
+      ///Give back the bottom left corner
+
+      ///Give back the bottom left corner.
+      ///If the bounding box is empty, then the return value is not defined.
       xy<T> bottomLeft() const {
         return bottom_left;
       }
 
-      ///\brief Sets the bottom left corner
-      ///(should only bee used for non-empty box) 
+      ///Set the bottom left corner
+
+      ///Set the bottom left corner.
+      ///It should only bee used for non-empty box.
       void bottomLeft(xy<T> p) {
 	bottom_left = p;
       }
 
-      ///\brief Gives back the top right corner
-      ///(if the bounding box is empty, then the return value is not defined) 
+      ///Give back the top right corner
+
+      ///Give back the top right corner.
+      ///If the bounding box is empty, then the return value is not defined.
       xy<T> topRight() const {
         return top_right;
       }
 
-      ///\brief Sets the top right corner
-      ///(should only bee used for non-empty box) 
+      ///Set the top right corner
+
+      ///Set the top right corner.
+      ///It should only bee used for non-empty box.
       void topRight(xy<T> p) {
 	top_right = p;
       }
 
-      ///\brief Gives back the bottom right corner
-      ///(if the bounding box is empty, then the return value is not defined) 
+      ///Give back the bottom right corner
+
+      ///Give back the bottom right corner.
+      ///If the bounding box is empty, then the return value is not defined.
       xy<T> bottomRight() const {
         return xy<T>(top_right.x,bottom_left.y);
       }
 
-      ///\brief Sets the bottom right corner
-      ///(should only bee used for non-empty box) 
+      ///Set the bottom right corner
+
+      ///Set the bottom right corner.
+      ///It should only bee used for non-empty box.
       void bottomRight(xy<T> p) {
 	top_right.x = p.x;
 	bottom_left.y = p.y;
       }
-
-      ///\brief Gives back the top left corner
-      ///(if the bounding box is empty, then the return value is not defined) 
+ 
+      ///Give back the top left corner
+
+      ///Give back the top left corner.
+      ///If the bounding box is empty, then the return value is not defined.
       xy<T> topLeft() const {
         return xy<T>(bottom_left.x,top_right.y);
       }
 
-      ///\brief Sets the top left corner
-      ///(should only bee used for non-empty box) 
+      ///Set the top left corner
+
+      ///Set the top left corner.
+      ///It should only bee used for non-empty box.
       void topLeft(xy<T> p) {
 	top_right.y = p.y;
@@ -310,60 +344,80 @@
       }
 
-      ///\brief Gives back the bottom of the box
-      ///(if the bounding box is empty, then the return value is not defined) 
+      ///Give back the bottom of the box
+
+      ///Give back the bottom of the box.
+      ///If the bounding box is empty, then the return value is not defined.
       T bottom() const {
         return bottom_left.y;
       }
 
-      ///\brief Sets the bottom of the box
-      ///(should only bee used for non-empty box) 
+      ///Set the bottom of the box
+
+      ///Set the bottom of the box.
+      ///It should only bee used for non-empty box.
       void bottom(T t) {
 	bottom_left.y = t;
       }
 
-      ///\brief Gives back the top of the box
-      ///(if the bounding box is empty, then the return value is not defined) 
+      ///Give back the top of the box
+
+      ///Give back the top of the box.
+      ///If the bounding box is empty, then the return value is not defined.
       T top() const {
         return top_right.y;
       }
 
-      ///\brief Sets the top of the box
-      ///(should only bee used for non-empty box) 
+      ///Set the top of the box
+
+      ///Set the top of the box.
+      ///It should only bee used for non-empty box.
       void top(T t) {
 	top_right.y = t;
       }
 
-      ///\brief Gives back the left side of the box
-      ///(if the bounding box is empty, then the return value is not defined) 
+      ///Give back the left side of the box
+
+      ///Give back the left side of the box.
+      ///If the bounding box is empty, then the return value is not defined.
       T left() const {
         return bottom_left.x;
       }
-
-      ///\brief Sets the left side of the box
-      ///(should only bee used for non-empty box) 
+ 
+      ///Set the left side of the box
+
+      ///Set the left side of the box.
+      ///It should only bee used for non-empty box
       void left(T t) {
 	bottom_left.x = t;
       }
 
-      ///\brief Gives back the right side of the box
-      ///(if the bounding box is empty, then the return value is not defined) 
+      /// Give back the right side of the box
+
+      /// Give back the right side of the box.
+      ///If the bounding box is empty, then the return value is not defined.
       T right() const {
         return top_right.x;
       }
 
-      ///\brief Sets the right side of the box
-      ///(should only bee used for non-empty box) 
+      ///Set the right side of the box
+
+      ///Set the right side of the box.
+      ///It should only bee used for non-empty box
       void right(T t) {
 	top_right.x = t;
       }
 
-      ///\brief Gives back the height of the box
-      ///(if the bounding box is empty, then the return value is not defined) 
+      ///Give back the height of the box
+
+      ///Give back the height of the box.
+      ///If the bounding box is empty, then the return value is not defined.
       T height() const {
         return top_right.y-bottom_left.y;
       }
 
-      ///\brief Gives back the width of the box
-      ///(if the bounding box is empty, then the return value is not defined) 
+      ///Give back the width of the box
+
+      ///Give back the width of the box.
+      ///If the bounding box is empty, then the return value is not defined.
       T width() const {
         return top_right.x-bottom_left.x;
