1
#include "../NKernel.h"
2
#include "MathFunctions.h"
7
const float Const::pi = 3.1415926535f;
8
const float Const::Pi = 3.1415926535f;
9
const float Const::e = 2.7182817f;
10
const float Const::sqrt2 = 1.414214f;
11
const float Const::sqrt3 = 1.732051f;
12
const float Const::golden = 1.618034f;
14
const double Const::EpsilonMilli = 0.001;
15
const double Const::EpsilonMicro = 0.000001;
16
const double Const::EpsilonNano = 0.000000001;
17
const double Const::EpsilonPico = 0.000000000001;
18
const double Const::EpsilonFemto = 0.000000000000001;
20
t_int Factorial(t_int n)
31
t_double BinomialCoefficient(t_int n, t_int k)
39
t_double d = (t_double) Factorial(n) / (t_double) (Factorial(n-k) * Factorial(k));
43
t_double Power(t_double x, t_double y)
45
return std::pow(x, y);
48
t_double Log2(t_double d)
50
return std::log(d) / std::log(2.0);
53
t_double Floor(t_double d)
b'\\ No newline at end of file'