mirror of https://github.com/CGAL/cgal
Added 3-arg min/max functions.
This commit is contained in:
parent
a8aca05893
commit
80ff253781
|
|
@ -55,6 +55,13 @@ NT
|
|||
min(const NT& x, const NT& y)
|
||||
{ return (y < x) ? y : x; }
|
||||
|
||||
template <class NT, class Comp>
|
||||
inline
|
||||
NT
|
||||
// const NT&
|
||||
min(const NT& x, const NT& y, const Comp& c)
|
||||
{ return c(x, y) ? x : y; }
|
||||
|
||||
template <class NT>
|
||||
inline
|
||||
NT
|
||||
|
|
@ -62,6 +69,13 @@ NT
|
|||
max(const NT& x, const NT& y)
|
||||
{ return (x < y) ? y : x; }
|
||||
|
||||
template <class NT, class Comp>
|
||||
inline
|
||||
NT
|
||||
// const NT&
|
||||
max(const NT& x, const NT& y, const Comp& c)
|
||||
{ return c(x, y) ? y : x; }
|
||||
|
||||
#endif
|
||||
|
||||
CGAL_END_NAMESPACE
|
||||
|
|
|
|||
Loading…
Reference in New Issue