summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-03-06 15:30:40 +0000
committeryexo <yexo@openttd.org>2010-03-06 15:30:40 +0000
commit0baa5ff94495c3bcec79292df8b4409f5ad0802f (patch)
tree178314f61f85e092d12116012a80c03320568617 /src
parentbf6167710f94f1ef7e704915253c4366ab2ecf14 (diff)
downloadopenttd-0baa5ff94495c3bcec79292df8b4409f5ad0802f.tar.xz
(svn r19352) -Fix (r19332): MSVC doesn't have M_PI in math.h
Diffstat (limited to 'src')
-rw-r--r--src/stdafx.h5
-rw-r--r--src/tgp.cpp5
2 files changed, 5 insertions, 5 deletions
diff --git a/src/stdafx.h b/src/stdafx.h
index 649b80d8d..fdbc81e73 100644
--- a/src/stdafx.h
+++ b/src/stdafx.h
@@ -328,6 +328,11 @@ assert_compile(sizeof(uint32) == 4);
assert_compile(sizeof(uint16) == 2);
assert_compile(sizeof(uint8) == 1);
+#ifndef M_PI_2
+#define M_PI_2 1.57079632679489661923
+#define M_PI 3.14159265358979323846
+#endif /* M_PI_2 */
+
/**
* Return the length of an fixed size array.
* Unlike sizeof this function returns the number of elements
diff --git a/src/tgp.cpp b/src/tgp.cpp
index b1a3dc129..a73b18971 100644
--- a/src/tgp.cpp
+++ b/src/tgp.cpp
@@ -151,11 +151,6 @@
*
*/
-#ifndef M_PI_2
-#define M_PI_2 1.57079632679489661923
-#define M_PI 3.14159265358979323846
-#endif /* M_PI_2 */
-
/** Fixed point type for heights */
typedef int16 height_t;
static const int height_decimal_bits = 4;