1 #if !defined(sol_math_sign_hpp_included)
2 #define sol_math_sign_hpp_included
3 /// \addtogroup sol_math
8 * \file sol/math/sign.hpp
9 * \brief Compile-time sign taking
10 * \author Sven Suursoho
14 #include <sol/cstdint.hpp>
17 namespace sol
{ namespace math
{
20 /// Take sign of V during compile-time
24 /// Has -1 if V is less than zero and 1 otherwise
25 static int const value
= (V
< 0) ? -1 : 1;
29 }} // namespace sol::math
33 #endif // sol_math_sign_hpp_included