Cleanup use of M_PI/PI defines

gprim/geom2d.cpp includes mystdlib.h, which already has a fallback define
for M_PI. As geomfuncs.cpp also includes mystdlib.h, use M_PI instead
of a truncated value.

occ/Partition_Loop2d.cxx already gets M_PI from the opencascade headers
(~everything includes Standard_Real.hxx, which includes Standard_math.hxx,
which sets _USE_MATH_DEFINES for Windows and includes math.h).
This commit is contained in:
Stefan Brüns 2021-03-10 00:45:56 +01:00
parent 883baf4189
commit 2767672286
3 changed files with 1 additions and 7 deletions

View File

@ -3,10 +3,6 @@
#include <myadt.hpp>
#include <gprim.hpp>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
namespace netgen
{

View File

@ -83,7 +83,7 @@ double Det (const Mat<3,3> & m)
void EigenValues (const Mat<3,3> & m, Vec<3> & ev)
{
const double pi = 3.141592;
const double pi = M_PI;
double a, b, c, d;
double p, q;
double arg;

View File

@ -52,8 +52,6 @@
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#define PI 3.14159265358979323846
//=======================================================================
//function : Partition_Loop2d
//purpose :