diff -r cb26a6250401 -r da44ee225dad src/lemon/xy.h --- a/src/lemon/xy.h Sun Mar 06 21:20:49 2005 +0000 +++ b/src/lemon/xy.h Mon Mar 07 07:53:20 2005 +0000 @@ -180,6 +180,29 @@ return os; } + ///Rotate by 90 degrees + + ///Returns its parameter rotated by 90 degrees in positive direction. + ///\relates xy + /// + template + inline xy rot90(const xy &z) + { + return xy(-z.y,z.x); + } + + ///Rotate by 270 degrees + + ///Returns its parameter rotated by 90 degrees in negative direction. + ///\relates xy + /// + template + inline xy rot270(const xy &z) + { + return xy(z.y,-z.x); + } + + /// A class to calculate or store the bounding box of plainvectors.