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>
15 #include <sol/utility/integral_constant.hpp>
18 namespace sol
{ namespace math
{
21 /// Take sign of V during compile-time
24 : integral_constant
<intmax_t, (V
< 0) ? -1 : 1>
28 }} // namespace sol::math
32 #endif // sol_math_sign_hpp_included