COIN-OR::LEMON - Graph Library

Changeset 1202:da44ee225dad in lemon-0.x for src/lemon/xy.h


Ignore:
Timestamp:
03/07/05 08:53:20 (20 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1614
Message:
  • rot90() and rot270() added to xy.h
  • graph_to_eps.h's own rot() func. replaced to this
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/xy.h

    r1164 r1202  
    181181  }
    182182
     183  ///Rotate by 90 degrees
     184
     185  ///Returns its parameter rotated by 90 degrees in positive direction.
     186  ///\relates xy
     187  ///
     188  template<typename T>
     189  inline xy<T> rot90(const xy<T> &z)
     190  {
     191    return xy<T>(-z.y,z.x);
     192  }
     193
     194  ///Rotate by 270 degrees
     195
     196  ///Returns its parameter rotated by 90 degrees in negative direction.
     197  ///\relates xy
     198  ///
     199  template<typename T>
     200  inline xy<T> rot270(const xy<T> &z)
     201  {
     202    return xy<T>(z.y,-z.x);
     203  }
     204
     205 
    183206
    184207  /// A class to calculate or store the bounding box of plainvectors.
Note: See TracChangeset for help on using the changeset viewer.