mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-21 09:41:39 +00: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:
parent
4000df2c66
commit
669de4890a
6 changed files with 17 additions and 16 deletions
|
@ -126,11 +126,11 @@ void RadiusAdjustment(s8 &_x, s8 &_y, int _Radius)
|
|||
float Square2CircleDistance(float deg)
|
||||
{
|
||||
// See if we have to adjust the angle
|
||||
deg = abs(deg);
|
||||
deg = fabsf(deg);
|
||||
if( (deg > 45 && deg < 135) ) deg = deg - 90;
|
||||
|
||||
// Calculate distance from center
|
||||
float val = abs(cos(Deg2Rad(deg)));
|
||||
float val = fabsf(cos(Deg2Rad(deg)));
|
||||
float Distance = 1 / val;
|
||||
|
||||
//m_frame->m_pStatusBar2->SetLabel(wxString::Format("Deg:%f Val:%f Dist:%f", deg, val, dist));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue