9 const double PI = acos(-1);
13 return (n == 1 || n == 0) ? 1 :
factorial(n - 1) * n;
16 inline const size_t nChoosek(
size_t n,
size_t k)
32 for (
size_t i = 2; i <= k; ++i)
34 result *= (n - i + 1);
43 return (T(0) < val) - (val < T(0));
49 inline double atan2(
double y,
double x,
int branch = 0)
51 double val = (((x != 0) || (y != 0)) ? std::atan2(y, x) : 0.0);
65 else if ((y == 0) && (x < 0))
const int sgn(T val)
Definition math.hpp:41
double atan2(double y, double x, int branch=0)
Definition math.hpp:49
const size_t nChoosek(size_t n, size_t k)
Definition math.hpp:16
const double PI
Free math functions and global variables ///.
Definition math.hpp:9
const size_t factorial(size_t n)
Definition math.hpp:11