EGXPhys

Functions

template<typename T >
int EGXMath::QuickSign (const T &x)
 Gives the sign of a number. -1 for negative numbers, 1 for positive and 0 for zero.

\[sign(x)=(0 < x) - (x < 0) \]

. More...

 

Detailed Description

Function Documentation

◆ QuickSign()

template<typename T >
int EGXMath::QuickSign ( const T &  x)
inline

Gives the sign of a number. -1 for negative numbers, 1 for positive and 0 for zero.

\[sign(x)=(0 < x) - (x < 0) \]

.

Parameters
x\(x\ (dimensionless)\) is the argument of the function.
Returns
\(sign(x)\ (dimensionless)\) the sign of x.