Define M_PI on MSVC

This commit is contained in:
Perttu Ahola 2012-06-23 16:06:03 +03:00
parent 4b97023251
commit 71c6845a94
5 changed files with 11 additions and 0 deletions

@ -34,6 +34,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "sound.h"
#include "event.h"
#include "util/numeric.h"
#include "util/mathconstants.h"
Camera::Camera(scene::ISceneManager* smgr, MapDrawControl& draw_control,
IGameDef *gamedef):

@ -29,6 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "mapblock.h"
#include "profiler.h"
#include "settings.h"
#include "util/mathconstants.h"
#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"

@ -38,6 +38,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "localplayer.h"
#include "util/numeric.h" // For IntervalLimiter
#include "util/serialize.h"
#include "util/mathconstants.h"
class Settings;
struct ToolCapabilities;

@ -53,6 +53,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "hex.h"
#include "util/string.h"
#include "util/pointedthing.h"
#include "util/mathconstants.h"
#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"

7
src/util/mathconstants.h Normal file

@ -0,0 +1,7 @@
#include <math.h>
// MSVC doesn't seem to define this
#ifndef M_PI
#define M_PI 3.1415926535
#endif