Better fix for M_PI definition

Just use #define _USE_MATH_DEFINES for cmath
This commit is contained in:
PabstMirror 2015-12-20 13:50:13 -06:00
parent 683f45682a
commit bba908fcae
2 changed files with 4 additions and 5 deletions

View File

@ -5,10 +5,6 @@
#include <unordered_map>
#include <random>
//Guard for M_PI ???? ref https://github.com/acemod/ACE3/pull/2382
#ifndef M_PI
#define M_PI 3.14159265358979323846f
#endif
#define GRAVITY 9.80665f
#define ABSOLUTE_ZERO_IN_CELSIUS -273.15f

View File

@ -1,5 +1,9 @@
#pragma once
//_USE_MATH_DEFINES + cmath needs to be first or M_PI won't be defined in VS2015
#define _USE_MATH_DEFINES
#include <cmath>
#include "targetver.h"
#include <assert.h>
#include <stdio.h>
@ -11,7 +15,6 @@
#include <map>
#include <unordered_map>
#include <memory>
#include <cmath>
#include <cstdint>
#include <streambuf>
#include "ace_version.hpp"