10inline int sign(
double number)
14 }
else if (
greater(0.0, number)) {
21template <
int iexp,
typename T>
24 static_assert(iexp >= 0,
"Exponent must be an integer greater or equal to zero.");
27 return static_cast<T
>(1.);
provides general mathematical constants and functions.
constexpr T pow_int(const T x)
Computes the power of a given number by an integral exponent given at compile time,...
int sign(double number)
Return the sign, one of {-1, 0, 1}.
std::enable_if< std::is_arithmetic< Scalar >::value, bool >::type greater(Scalar A, Scalar B, Scalar tolerance=NUMERICAL_ZERO_DIFFERENCE)