23#ifndef VCL_BASE_MATH_H
24#define VCL_BASE_MATH_H
42template<
typename Scalar>
45 return std::isinf(number) || std::isnan(number);
63template<
typename Scalar>
67 Scalar
epsilon = std::numeric_limits<Scalar>::epsilon())
80template<
typename Scalar>
94template<
typename Scalar>
114 static const int FAK_LEN = 1024;
118 C0 = 0.918938533204672722,
119 C1 = 1. / 12.,
C3 = -1. / 360.;
137 sum += std::log(
double(
i));
A class representing a box in N-dimensional space.
Definition box.h:46
bool epsilonEquals(Scalar n1, Scalar n2, Scalar epsilon=std::numeric_limits< Scalar >::epsilon())
Checks if two floating point numbers are equal within an epsilon value.
Definition math.h:64
Scalar toRad(const Scalar °)
Converts an angle in degrees to radians.
Definition math.h:81
bool isDegenerate(Scalar number)
Checks if a floating point number is degenerate.
Definition math.h:43
double lnOfFactorial(int n)
Computes and caches the result of the natural logarithm of n!
Definition math.h:112
Scalar toDeg(const Scalar &rad)
Converts an angle in radians to degrees.
Definition math.h:95