Jpp  15.0.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JLib.hh
Go to the documentation of this file.
1 #ifndef __JEEP__JLIB__
2 #define __JEEP__JLIB__
3 
4 /**
5  * \author mdejong
6  */
7 
8 namespace JEEP {}
9 namespace JPP { using namespace JEEP; }
10 
11 namespace JEEP {
12 
13  /**
14  * Get sign of value.
15  *
16  * \param value value
17  * \return -1 if value < 0; 0 if value == 0; +1 if value > 0
18  */
19  template<class T>
20  inline int sign(const T& value)
21  {
22  return (value > T(0)) - (value < T(0));
23  }
24 }
25 
26 #endif
do set_variable OUTPUT_DIRECTORY $WORKDIR T
int sign(const T &value)
Get sign of value.
Definition: JLib.hh:20