summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-06-23 16:06:03 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-07-21 03:36:34 +0300
commit71c6845a9446fc22a84469f28e0e6890794802e3 (patch)
treeca7b73a79c30caf7f3d38b53efafa0d4f0e85e86 /src
parent4b97023251890314c85ad4710d85ddeae6ac3e22 (diff)
downloadminetest-71c6845a9446fc22a84469f28e0e6890794802e3.tar.gz
minetest-71c6845a9446fc22a84469f28e0e6890794802e3.tar.bz2
minetest-71c6845a9446fc22a84469f28e0e6890794802e3.zip
Define M_PI on MSVC
Diffstat (limited to 'src')
-rw-r--r--src/camera.cpp1
-rw-r--r--src/clientmap.cpp1
-rw-r--r--src/content_cao.cpp1
-rw-r--r--src/server.cpp1
-rw-r--r--src/util/mathconstants.h7
5 files changed, 11 insertions, 0 deletions
diff --git a/src/camera.cpp b/src/camera.cpp
index 32dd85e52..f87f660e9 100644
--- a/src/camera.cpp
+++ b/src/camera.cpp
@@ -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):
diff --git a/src/clientmap.cpp b/src/clientmap.cpp
index 6cf3db8d7..4d14cc1a2 100644
--- a/src/clientmap.cpp
+++ b/src/clientmap.cpp
@@ -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<<")"
diff --git a/src/content_cao.cpp b/src/content_cao.cpp
index 5702a73b6..58ff130f2 100644
--- a/src/content_cao.cpp
+++ b/src/content_cao.cpp
@@ -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;
diff --git a/src/server.cpp b/src/server.cpp
index b125bff8d..80df9fc7a 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -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<<")"
diff --git a/src/util/mathconstants.h b/src/util/mathconstants.h
new file mode 100644
index 000000000..1b478aa95
--- /dev/null
+++ b/src/util/mathconstants.h
@@ -0,0 +1,7 @@
+#include <math.h>
+
+// MSVC doesn't seem to define this
+#ifndef M_PI
+ #define M_PI 3.1415926535
+#endif
+