Replace some lrint's with GetTimeSinceStartSeconds()

Optimization to avoid several stages of integer-to-float and float-to-integer by making use of GetTimeSinceStartSeconds().
This commit is contained in:
sukibaby
2025-04-30 00:06:15 -07:00
committed by teejusb
parent d3ff9a0683
commit 25b57c13d5
+2 -2
View File
@@ -328,7 +328,7 @@ void BitmapText::BuildChars()
if( m_bUsingDistortion )
{
int iSeed = std::lrint( RageTimer::GetTimeSinceStart()*500000.0f );
int iSeed = RageTimer::GetTimeSinceStartSeconds() * 500000;
RandomGen rnd( iSeed );
for(unsigned int i= 0; i < m_aVertices.size(); i+=4)
{
@@ -798,7 +798,7 @@ void BitmapText::DrawPrimitives() noexcept
std::vector<RageVector3> vGlyphJitter;
if( m_bJitter )
{
int iSeed = std::lrint( RageTimer::GetTimeSinceStart()*8 );
int iSeed = RageTimer::GetTimeSinceStartSeconds() * 8;
RandomGen rnd( iSeed );
for (size_t i = 0; i < m_aVertices.size(); i += 4)
{