aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authormd52011-03-19 01:56:10 +0200
committermd52011-03-19 01:56:10 +0200
commit3924fc0bada989332b66292204e328341f6ab72e (patch)
tree1697b5868fd27615d18f5cdab3fde9ec7c43e32d /common
parent3e3619feb87c9b63a0dae08c2dd29ed43dc1bc82 (diff)
downloadscummvm-rg350-3924fc0bada989332b66292204e328341f6ab72e.tar.gz
scummvm-rg350-3924fc0bada989332b66292204e328341f6ab72e.tar.bz2
scummvm-rg350-3924fc0bada989332b66292204e328341f6ab72e.zip
COMMON: Enable math constants under Visual Studio
Diffstat (limited to 'common')
-rw-r--r--common/scummsys.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/scummsys.h b/common/scummsys.h
index b0f514cdd1..a12370ccd6 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -94,6 +94,11 @@
#include <stdarg.h>
#include <assert.h>
#include <ctype.h>
+ // MSVC does not define M_PI, M_SQRT2 and other math defines by default.
+ // _USE_MATH_DEFINES must be defined in order to have these defined, thus
+ // we enable it here. For more information, check:
+ // http://msdn.microsoft.com/en-us/library/4hwaceh6(v=VS.100).aspx
+ #define _USE_MATH_DEFINES
#include <math.h>
#endif