diff options
author | Philipp Sehmisch <mana@crushnet.org> | 2011-06-18 20:16:47 +0200 |
---|---|---|
committer | Philipp Sehmisch <mana@crushnet.org> | 2011-06-18 20:16:47 +0200 |
commit | 98a6003999eb198d9b953c11cca43aad181788c9 (patch) | |
tree | 0892bdfbf23989a1355d36a928b2a5c03a69dd65 /src/particleemitterprop.h | |
parent | faf0a45d6b8b85acd2836cf5e8e7f7c5b161931d (diff) | |
download | mana-98a6003999eb198d9b953c11cca43aad181788c9.tar.gz mana-98a6003999eb198d9b953c11cca43aad181788c9.tar.bz2 mana-98a6003999eb198d9b953c11cca43aad181788c9.tar.xz mana-98a6003999eb198d9b953c11cca43aad181788c9.zip |
Fixed compilation problems on windows caused by the switch to C++0x.
The M_PI constant from <cmath> is not standard anymore, so I replaced it
with an own PI constant.
WIN32 isn't defined anymore which caused the enet UNIX header to be
included, so I had to define it in the project compilation settings.
Reviewed-by: Thorbjorn
Diffstat (limited to 'src/particleemitterprop.h')
-rw-r--r-- | src/particleemitterprop.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/particleemitterprop.h b/src/particleemitterprop.h index c73d044c..b1268e8d 100644 --- a/src/particleemitterprop.h +++ b/src/particleemitterprop.h @@ -21,6 +21,8 @@ #include <cmath> +static const double PI = 3.14159265; + enum ChangeFunc { @@ -64,7 +66,7 @@ template <typename T> struct ParticleEmitterProp switch (changeFunc) { case FUNC_SINE: - val += (T) std::sin(M_PI * 2 * ((double)(tick%changePeriod) / (double)changePeriod)) * changeAmplitude; + val += (T) std::sin(PI * 2 * ((double)(tick%changePeriod) / (double)changePeriod)) * changeAmplitude; break; case FUNC_SAW: val += (T) (changeAmplitude * ((double)(tick%changePeriod) / (double)changePeriod)) * 2 - changeAmplitude; |