mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
abs() works on ints, not floats. Use fabsf() to avoid the double conversions.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5956 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -360,7 +360,7 @@ void TiltToAccelerometer(int &_x, int &_y, int &_z, STiltData &_TiltData)
|
||||
and Pitch. But if we select a Z from the smallest of the absolute
|
||||
value of cos(Roll) and cos (Pitch) we get the right values. */
|
||||
// ---------
|
||||
if (abs(cos(Roll)) < abs(cos(Pitch)))
|
||||
if (fabsf(cos(Roll)) < fabsf(cos(Pitch)))
|
||||
z = cos(Roll);
|
||||
else
|
||||
z = cos(Pitch);
|
||||
|
Reference in New Issue
Block a user