From 8db9e0146a195e9b30a5a5df61e55dc66ef69686 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Thu, 28 Dec 2023 12:00:47 -0500 Subject: [PATCH] additional M_PI definitions --- gtsam/3rdparty/cephes/cephes/mconf.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gtsam/3rdparty/cephes/cephes/mconf.h b/gtsam/3rdparty/cephes/cephes/mconf.h index 08119ef85..e200b9b03 100644 --- a/gtsam/3rdparty/cephes/cephes/mconf.h +++ b/gtsam/3rdparty/cephes/cephes/mconf.h @@ -102,9 +102,15 @@ #define cephes_isfinite(x) isfinite(x) #endif +/* M_PI et al. are not defined in math.h in C99, even with _USE_MATH_DEFINES */ #if !defined(M_PI) #define M_PI 3.14159265358979323846 #endif +#ifndef M_PI_2 +#define M_PI_2 1.57079632679489661923 /* pi/2 */ +#define M_1_PI 0.31830988618379067154 /* 1/pi */ +#define M_2_PI 0.63661977236758134308 /* 2/pi */ +#endif /* Constants needed that are not available in the C standard library */ #define SCIPY_EULER 0.577215664901532860606512090082402431 /* Euler constant */