aimstil  5.0.5
misc_sort.h
Go to the documentation of this file.
1 #ifndef TIL_MISC_SORT_H_
2 #define TIL_MISC_SORT_H_
3 
5 
6 // includes from STL
7 #include <utility> // std::pair
8 
9 namespace til
10 {
11  //---------------------------------------------------------------------------
12 
14  template < typename TVector2D, typename T >
15  inline TVector2D
16  sortedVector(T a, T b);
17 
18  //---------------------------------------------------------------------------
19 
20  template < typename TVector3D, typename T >
21  inline TVector3D
22  sorted_vector(T a, T b, T c);
23 
24  //---------------------------------------------------------------------------
25 
27  template < typename TVector3D >
28  inline TVector3D
29  sorted_vector(TVector3D v);
30 
31  //---------------------------------------------------------------------------
32 
34  template < typename T >
35  inline std::pair<T,T>
36  make_sorted_pair(T a, T b);
37 
38  //---------------------------------------------------------------------------
39 
40 } // namespace til
41 
42 // package include
43 #include "misc_sort.tpp"
44 
45 #endif /*MISC_SORT_H_*/
std::pair< T, T > make_sorted_pair(T a, T b)
Return (a, b) if a >= b, (b, a) else.
Belongs to package Box Do not include directly, include til/Box.h instead.
Definition: Accumulator.h:10
TVector2D sortedVector(T a, T b)
returns vector (x, y) with x <= y
TVector3D sorted_vector(T a, T b, T c)