Skip to content

Commit

Permalink
Merge pull request #1208 from dcoeurjo/M_PI
Browse files Browse the repository at this point in the history
Explicit M_PI definition
  • Loading branch information
kerautret authored Oct 17, 2016
2 parents 117e7dd + 7a6a688 commit ac2479e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
- *Configuration/General*
- Fixing errors and warnings raised by g++ 4.7.x.
(Roland Denis, [#1202](https://github.com/DGtal-team/DGtal/pull/1202))
- Explicit M_PI definition if needed.
(David Coeurjolly, [#1208](https://github.com/DGtal-team/DGtal/pull/1208))

- *Geometry Package*
- ArithDSSIterator: fix missing postfix ++.
Expand Down
13 changes: 10 additions & 3 deletions src/DGtal/base/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
#ifdef M_PI
#undef M_PI
#endif

//C++ exception specification ignored except
//to indicate a function is not __declspec(nothrow)
#pragma warning(disable : 4290)
Expand All @@ -81,6 +82,15 @@
#include <cmath>
#endif //win32

// Explicit M_PI definition if needed
// (issue https://github.com/DGtal-team/DGtal/issues/1204)
#ifndef M_PI
#define M_PI (3.14159265358979323846)
#endif
#ifndef M_PI_2
#define M_PI_2 (1.57079632679489661923)
#endif


#if defined( WIN32 )
#define secured_sprintf sprintf_s
Expand All @@ -100,9 +110,6 @@
#include "DGtal/base/BasicArchetypes.h"
#include "DGtal/base/Exceptions.h"


//////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////
namespace DGtal
{
Expand Down

0 comments on commit ac2479e

Please sign in to comment.