mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-14 16:40:46 +00:00
- Blood: Increase precision of values used within GetWaveValue()
.
This commit is contained in:
parent
30cacb1a70
commit
95f05d51c5
1 changed files with 3 additions and 3 deletions
|
@ -43,13 +43,13 @@ double GetWaveValue(unsigned int nPhase, int nType)
|
||||||
switch (nType)
|
switch (nType)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
return 0.5 - 0.5 * BobVal(int((nPhase >> 6) + 512));
|
return 0.5 - 0.5 * BobVal((nPhase / 64.) + 512);
|
||||||
case 1:
|
case 1:
|
||||||
return FixedToFloat(nPhase);
|
return FixedToFloat(nPhase);
|
||||||
case 2:
|
case 2:
|
||||||
return 1.0 - BobVal(int((nPhase >> 7) + 512));
|
return 1.0 - BobVal((nPhase / 128.) + 512);
|
||||||
case 3:
|
case 3:
|
||||||
return BobVal(int(nPhase >> 7));
|
return BobVal(nPhase / 128.);
|
||||||
}
|
}
|
||||||
return nPhase;
|
return nPhase;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue