mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-16 23:06:03 +00:00
Removed SDL_stdinc.h dependency on HAVE_M_PI, added SDL_M_PIl (double) and SDL_M_PIf (float) instead
This commit is contained in:
@@ -1192,9 +1192,9 @@ static void HandleMotionPlusData(SDL_DriverWii_Context *ctx, SDL_Joystick *joyst
|
||||
z *= 2000;
|
||||
}
|
||||
|
||||
values[0] = -((float)z / GYRO_RES_PER_DEGREE) * (float)M_PI / 180.0f;
|
||||
values[1] = ((float)x / GYRO_RES_PER_DEGREE) * (float)M_PI / 180.0f;
|
||||
values[2] = ((float)y / GYRO_RES_PER_DEGREE) * (float)M_PI / 180.0f;
|
||||
values[0] = -((float)z / GYRO_RES_PER_DEGREE) * SDL_M_PIf / 180.0f;
|
||||
values[1] = ((float)x / GYRO_RES_PER_DEGREE) * SDL_M_PIf / 180.0f;
|
||||
values[2] = ((float)y / GYRO_RES_PER_DEGREE) * SDL_M_PIf / 180.0f;
|
||||
SDL_PrivateJoystickSensor(joystick, SDL_SENSOR_GYRO, 0, values, 3);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user