1.1 --- a/src/lemon/xy.h Sun Mar 06 21:20:49 2005 +0000
1.2 +++ b/src/lemon/xy.h Mon Mar 07 07:53:20 2005 +0000
1.3 @@ -180,6 +180,29 @@
1.4 return os;
1.5 }
1.6
1.7 + ///Rotate by 90 degrees
1.8 +
1.9 + ///Returns its parameter rotated by 90 degrees in positive direction.
1.10 + ///\relates xy
1.11 + ///
1.12 + template<typename T>
1.13 + inline xy<T> rot90(const xy<T> &z)
1.14 + {
1.15 + return xy<T>(-z.y,z.x);
1.16 + }
1.17 +
1.18 + ///Rotate by 270 degrees
1.19 +
1.20 + ///Returns its parameter rotated by 90 degrees in negative direction.
1.21 + ///\relates xy
1.22 + ///
1.23 + template<typename T>
1.24 + inline xy<T> rot270(const xy<T> &z)
1.25 + {
1.26 + return xy<T>(z.y,-z.x);
1.27 + }
1.28 +
1.29 +
1.30
1.31 /// A class to calculate or store the bounding box of plainvectors.
1.32