Clean up math functions
- Remove checking for standard functions from the build system - Prefix all invocations with std:: - Replace suffixed functions with unprefixed versions - Include <cmath> in all files that use it and remove the global include e.g. floorf(x) -> std::floor(x)
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
#include "RageTimer.h"
|
||||
#include "ThemeManager.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
/* todo: replace this entire thing with a set of AutoActors and a Scroller.
|
||||
* In reality, everything except the Beginner/Training icon can be replicated
|
||||
* in Lua (in stock StepMania 4), so I'm not sure if we even need this... -aj
|
||||
@@ -82,9 +84,9 @@ void WheelNotifyIcon::Update( float fDeltaTime )
|
||||
if( m_vIconsToShow.size() > 0 )
|
||||
{
|
||||
/* We should probably end up parsing the vector and then dynamically
|
||||
* insert flag icons based on "priority". Easy to do, hopefully
|
||||
* insert flag icons based on "priority". Easy to do, hopefully
|
||||
- Midiman */
|
||||
const float fSecondFraction = fmodf( RageTimer::GetTimeSinceStartFast(), 1 );
|
||||
const float fSecondFraction = std::fmod( RageTimer::GetTimeSinceStartFast(), 1 );
|
||||
const int index = (int)(fSecondFraction*m_vIconsToShow.size());
|
||||
Sprite::SetState( m_vIconsToShow[index] );
|
||||
}
|
||||
@@ -95,7 +97,7 @@ void WheelNotifyIcon::Update( float fDeltaTime )
|
||||
/*
|
||||
* (c) 2001-2004 Chris Danford
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -105,7 +107,7 @@ void WheelNotifyIcon::Update( float fDeltaTime )
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
Reference in New Issue
Block a user