Use stdlib for trigonometric functions

Profiling showed this performed significantly faster than the RageFast_ implementations.
This commit is contained in:
sukibaby
2024-07-17 21:37:27 -07:00
committed by teejusb
parent 64fa8e9971
commit e60cf2aa0d
9 changed files with 81 additions and 144 deletions
+2 -3
View File
@@ -7,7 +7,6 @@
#include "GameState.h"
#include "RageTimer.h"
#include "RageLog.h"
#include "RageMath.h"
#include "ThemeManager.h"
#include "NoteSkinManager.h"
#include "Song.h"
@@ -868,7 +867,7 @@ void NoteField::DrawPrimitives()
ASSERT(GAMESTATE->m_pCurSong != nullptr);
const TimingData &timing = *pTiming;
const RageColor text_glow= RageColor(1,1,1,RageFastCos(RageTimer::GetTimeSinceStartFast()*2)/2+0.5f);
const RageColor text_glow= RageColor(1,1,1,std::cos(RageTimer::GetTimeSinceStartFast()*2)/2+0.5f);
float horiz_align= align_right;
float side_sign= 1;
@@ -1055,7 +1054,7 @@ void NoteField::DrawPrimitives()
*m_FieldRenderArgs.selection_end_marker != -1)
{
m_FieldRenderArgs.selection_glow= SCALE(
RageFastCos(RageTimer::GetTimeSinceStartFast()*2), -1, 1, 0.1f, 0.3f);
std::cos(RageTimer::GetTimeSinceStartFast()*2), -1, 1, 0.1f, 0.3f);
}
m_FieldRenderArgs.fade_before_targets= FADE_BEFORE_TARGETS_PERCENT;