Differences From Artifact [bc3e893dc8]:

To Artifact [c0b27c8721]:




1
2
3
4
5
6
7



template <class T>
inline T max (const T &x1, const T &x2)
{
  return (x1 >= x2) ? x1 : (x2 < x1) ? x2 : 0;
}

>
>







1
2
3
4
5
6
7
8
9
#ifndef HAVE_USEFUL_FUNCTIONS_HH
#define HAVE_USEFUL_FUNCTIONS_HH

template <class T>
inline T max (const T &x1, const T &x2)
{
  return (x1 >= x2) ? x1 : (x2 < x1) ? x2 : 0;
}

58
59
60
61
62
63
64


sign (T x)
{
  return
    (0 < x) ? +1 :
    (0 > x) ? -1 :
    0;
}









>
>
60
61
62
63
64
65
66
67
68
sign (T x)
{
  return
    (0 < x) ? +1 :
    (0 > x) ? -1 :
    0;
}

#endif // HAVE_USEFUL_FUNCTIONS_HH

MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]