renamed SDL PI constants to SDL_PI_D and SDL_PI_F.

This commit is contained in:
Ozkan Sezer
2022-11-25 22:35:24 +03:00
parent 199423612c
commit 0b8309da0c
19 changed files with 150 additions and 150 deletions

View File

@@ -716,7 +716,7 @@ SDL_SYS_ToDirection(Uint16 *dest, SDL_HapticDirection * src)
--> add 45000 in total
--> finally convert to [0,0xFFFF] as in case SDL_HAPTIC_POLAR.
*/
tmp = (((Sint32) (f * 18000.0 / SDL_M_PIl)) + 45000) % 36000;
tmp = (((Sint32) (f * 18000.0 / SDL_PI_D)) + 45000) % 36000;
tmp = (tmp * 0x8000) / 18000; /* convert to range [0,0xFFFF] */
*dest = (Uint16) tmp;
}