libpgplotxx.a (C++ interface to PGPLOT)

◆ limit()

template<class T , class T2 >
T pgplot::helpers::limit ( const T &  v,
const T2 &  min,
const T2 &  max 
)

limit a value to min and max

Definition at line 58 of file xpgplotxx.cc.

Referenced by pgplot::Tlinestyle::sethls(), and pgplot::Tlinestyle::setrgb().

59  {
60  T retval = v > min ? v : min;
61  retval = retval < max ? retval : max;
62  return(retval);
63  } // T limit(const T& v, const T2& min, const T2&, max)
Here is the caller graph for this function: