diff options
author | Chris Apers | 2004-10-06 10:14:31 +0000 |
---|---|---|
committer | Chris Apers | 2004-10-06 10:14:31 +0000 |
commit | 2ca4529bbad0f92f1567309ec68281f19ed57c13 (patch) | |
tree | 3129303adcfbad785c710bd3f303d1519b0f46b9 | |
parent | d76a37588946865bdcc6fad49e9118ed8d07ea30 (diff) | |
download | scummvm-rg350-2ca4529bbad0f92f1567309ec68281f19ed57c13.tar.gz scummvm-rg350-2ca4529bbad0f92f1567309ec68281f19ed57c13.tar.bz2 scummvm-rg350-2ca4529bbad0f92f1567309ec68281f19ed57c13.zip |
Use common PI value instead
svn-id: r15435
-rw-r--r-- | backends/midi/ym2612.cpp | 3 | ||||
-rw-r--r-- | scumm/script_v72he.cpp | 4 | ||||
-rw-r--r-- | scumm/script_v90he.cpp | 4 |
3 files changed, 5 insertions, 6 deletions
diff --git a/backends/midi/ym2612.cpp b/backends/midi/ym2612.cpp index c6fe5bb646..3a5b1e1cab 100644 --- a/backends/midi/ym2612.cpp +++ b/backends/midi/ym2612.cpp @@ -864,13 +864,12 @@ void MidiDriver_YM2612::rate(uint16 r) _channel[i]->rate(r); } -#define M_PI 3.14159265358979323846 void MidiDriver_YM2612::createLookupTables() { { int i; sintbl = new int [2048]; for (i = 0; i < 2048; i++) - sintbl[i] = (int)(0xffff * sin(i/2048.0*2.0*M_PI)); + sintbl[i] = (int)(0xffff * sin(i/2048.0*2.0*PI)); } { diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index 529bb3fd2d..e9d3aab82c 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -1869,13 +1869,13 @@ void ScummEngine_v72he::o72_kernelGetFunctions() { break; case 1001: { - double a = args[1] * M_PI / 180.; + double a = args[1] * PI / 180.; push((int)(sin(a) * 100000)); } break; case 1002: { - double a = args[1] * M_PI / 180.; + double a = args[1] * PI / 180.; push((int)(cos(a) * 100000)); } break; diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index 99aa154c7d..e232cc9ea5 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -411,12 +411,12 @@ void ScummEngine_v90he::o90_getGT() { } void ScummEngine_v90he::o90_sin() { - double a = pop() * M_PI / 180.; + double a = pop() * PI / 180.; push((int)(sin(a) * 100000)); } void ScummEngine_v90he::o90_cos() { - double a = pop() * M_PI / 180.; + double a = pop() * PI / 180.; push((int)(cos(a) * 100000)); } |