#ifndef Foundation_Math_Sign_INCLUDED
#define Foundation_Math_Sign_INCLUDED

namespace Tn {

namespace math {

enum Sign {
    SIGN_POSITIVE = 1,
    SIGN_ZERO = 0,
    SIGN_NEGATIVE = -1 
};

template <typename T>
Sign sign(T i)
{
    if (i>T(0)) return SIGN_POSITIVE;
    if (i<T(0)) return SIGN_NEGATIVE;
    return SIGN_ZERO;
}

} // namespace math

} // namespace Tn

#endif

