3 #include <gsl/gsl_math.h> 11 inline static constexpr
double PI = M_PI;
13 inline static constexpr
double E = M_E;
15 inline static double to_radians(
double x) {
return PI / 180 * x; }
17 inline static double to_degrees(
double x) {
return 180 / PI * x; }
20 inline static bool is_zero(
double x,
double epsilon) {
21 return abs(x) < epsilon;
24 inline static int cmp(
double x,
double y,
double epsilon) {
25 return gsl_fcmp(x, y, epsilon);
28 inline static int sign(
double x) {
return GSL_SIGN(x); }
static double to_degrees(double x)
static constexpr double E
static int sign(double x)
The Math struct Mathematische Hilfsfunktionen.
static double to_radians(double x)
static bool is_zero(double x, double epsilon)
static constexpr double PI
static int cmp(double x, double y, double epsilon)