File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111#include < Eigen/Dense> // Need for the container function
1212
1313#include < hydroc/logging.h>
14-
15- // // RADU - why not use constants from Chrono?
16- #ifndef M_PI
17- #define M_PI 3.14159265358979323846
18- #endif
14+ #include < hydroc/math_constants.h>
1915
2016/* *@brief Base namespace for HydroChrono library
2117 *
Original file line number Diff line number Diff line change 1+ /*********************************************************************
2+ * @file math_constants.h
3+ * @brief Project-wide mathematical constants.
4+ *
5+ * Include this header instead of defining M_PI locally or relying on
6+ * _USE_MATH_DEFINES.
7+ *********************************************************************/
8+
9+ #ifndef HYDROC_MATH_CONSTANTS_H
10+ #define HYDROC_MATH_CONSTANTS_H
11+
12+ #ifndef M_PI
13+ #define M_PI 3.14159265358979323846
14+ #endif
15+
16+ #ifndef M_PI_2
17+ #define M_PI_2 1.57079632679489661923
18+ #endif
19+
20+ #endif // HYDROC_MATH_CONSTANTS_H
Original file line number Diff line number Diff line change 11// HydroChrono VSG Configuration Constants
22#pragma once
33
4- #include < cmath >
4+ #include < hydroc/math_constants.h >
55
6- #ifndef M_PI
7- #define M_PI 3.14159265358979323846
8- #endif
6+ #include < cmath>
97
108namespace hydroc {
119namespace gui {
Original file line number Diff line number Diff line change 33 * @brief Helper routines shared by wave models.
44 *********************************************************************/
55
6- #ifndef _USE_MATH_DEFINES
7- #define _USE_MATH_DEFINES
8- #endif
9-
106#include " wave_utilities.h"
7+ #include < hydroc/math_constants.h>
118
129#include < cmath>
1310#include < algorithm>
You can’t perform that action at this time.
0 commit comments