summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-09-23 10:11:45 +0200
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-09-23 10:11:45 +0200
commitacdc965eb6c1dd14508bcd0e50025bb4f01319f8 (patch)
treeb56e6a8288a9af768606505b2d151515f02d835e /src
parent63b05f9835d76f1426eec1049615c09a22ddd774 (diff)
Add Gudhi/math.h for pi
Diffstat (limited to 'src')
-rw-r--r--src/common/include/gudhi/math.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/common/include/gudhi/math.h b/src/common/include/gudhi/math.h
new file mode 100644
index 00000000..f367bac2
--- /dev/null
+++ b/src/common/include/gudhi/math.h
@@ -0,0 +1,23 @@
+/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
+ * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
+ * Author(s): Vincent Rouvreau
+ *
+ * Copyright (C) 2020 Inria
+ *
+ * Modification(s):
+ * - YYYY/MM Author: Description of the modification
+ */
+
+#ifndef MATH_H_
+#define MATH_H_
+
+#include <boost/math/constants/constants.hpp>
+
+namespace Gudhi {
+
+// In wait of C++20 std::numbers::pi with #include <numbers>
+static constexpr double PI = boost::math::constants::pi<double>();
+
+} // namespace Gudhi
+
+#endif // MATH_H_