35constexpr T
pi = T(3.1415926535897932385L);
44 static_assert(std::numeric_limits<T>::is_iec559,
"radians() only accepts floating-point inputs.");
45 return degrees *
static_cast<T
>(0.01745329251994329576923690768489);
55 static_assert(std::numeric_limits<T>::is_iec559,
"radians() only accepts floating-point inputs.");
56 return radians *
static_cast<T
>(57.295779513082320876798154814105);
66typename std::enable_if<std::is_unsigned<T>::value,
int>::type
inline constexpr sign(T
const x)
78typename std::enable_if<std::is_signed<T>::value,
int>::type
inline constexpr sign(T
const x)
80 return (T(0) < x) - (x < T(0));
constexpr T pi
Compile-time constant for pi (19 digits).
Definition: math.hpp:35
std::enable_if< std::is_unsigned< T >::value, int >::type constexpr sign(T const x)
Returns the sign of the given number (-1, 0 or +1).
Definition: math.hpp:66
T radians(T degrees)
Convert given degrees to radians.
Definition: math.hpp:41
T degrees(T radians)
Convert given radians to degree.
Definition: math.hpp:52
Namespace containing all of eos's 3D model fitting functionality.