From 96ccf2279104bc5c9c63364d713780363bccf24b Mon Sep 17 00:00:00 2001 From: Adrian Price-Whelan Date: Thu, 15 Oct 2020 08:44:30 -0400 Subject: [PATCH] define M_PI in headers --- gala/potential/potential/builtin/builtin_potentials.h | 4 ++++ gala/potential/scf/src/bfe_helper.h | 4 ++++ gala/potential/scf/src/coeff_helper.h | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/gala/potential/potential/builtin/builtin_potentials.h b/gala/potential/potential/builtin/builtin_potentials.h index e5624db92..8230efb97 100644 --- a/gala/potential/potential/builtin/builtin_potentials.h +++ b/gala/potential/potential/builtin/builtin_potentials.h @@ -1,3 +1,7 @@ +#ifndef M_PI + #define M_PI 3.14159265358979323846 +#endif + extern double nan_density(double t, double *pars, double *q, int n_dim); extern double nan_value(double t, double *pars, double *q, int n_dim); extern void nan_gradient(double t, double *pars, double *q, int n_dim, double *grad); diff --git a/gala/potential/scf/src/bfe_helper.h b/gala/potential/scf/src/bfe_helper.h index c7d9a6817..da8b67253 100644 --- a/gala/potential/scf/src/bfe_helper.h +++ b/gala/potential/scf/src/bfe_helper.h @@ -8,3 +8,7 @@ extern double phi_nlm(double s, double phi, double X, int n, int l, int m); extern void sph_grad_phi_nlm(double s, double phi, double X, int n, int l, int m, int lmax, double *sphgrad); // #endif + +#ifndef M_PI + #define M_PI 3.14159265358979323846 +#endif \ No newline at end of file diff --git a/gala/potential/scf/src/coeff_helper.h b/gala/potential/scf/src/coeff_helper.h index bc55d5b0f..dd526273c 100644 --- a/gala/potential/scf/src/coeff_helper.h +++ b/gala/potential/scf/src/coeff_helper.h @@ -12,3 +12,7 @@ extern void c_STnlm_discrete(double *s, double *phi, double *X, double *m_k, int extern void c_STnlm_var_discrete(double *s, double *phi, double *X, double *m_k, int K, int n, int l, int m, double *ST_var); + +#ifndef M_PI + #define M_PI 3.14159265358979323846 +#endif \ No newline at end of file