mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-04 17:06:25 +00:00
renamed SDL PI constants to SDL_PI_D and SDL_PI_F.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user