nttlTraits Method - Abs

Description
Return the absolute value of a number.

This is just a convienience function.  It is implemented in terms of the unary minus operator.  The function may need to be specialized if the type T does not implement the unary minus operator.

Signature
template<class T> T nttlTraits::Abs( const T& x )
Parameters
Name Type Description
x T The number to take the absolute value of.
Returns
( T )  The absolute value of x, as described above.
Example
#include <nttl/nttlTraits.h>
...
nttlTraits<int> tr;
...
int x = -10;
int a = tr.Abs( x );