- Blood: Increase precision of values used within GetWaveValue().

This commit is contained in:
Mitchell Richters 2023-01-02 23:26:54 +11:00
parent 30cacb1a70
commit 95f05d51c5

View file

@ -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;
} }