1
0
Fork 0

Game/FPSCounter: change m_fps variable and getFPS() return value from float to double.

MSVC complains about loss of information because sp::Time::seconds() returns double.
This commit is contained in:
Henrik Hautakoski 2022-09-26 12:03:54 +02:00
parent c11d71aaaa
commit 50e9300667
2 changed files with 3 additions and 3 deletions

View file

@ -17,7 +17,7 @@ public :
// Should be called whenever a frame has been rendered.
void addFrame();
float getFPS() const;
double getFPS() const;
// Set the update rate (in seconds).
// How often the FPS should be sampled and calculated.
@ -42,7 +42,7 @@ private :
Time m_updateRate;
// Calculated Frames per second.
float m_fps;
double m_fps;
};
} // namespace sp

View file

@ -16,7 +16,7 @@ void FPSCounter::addFrame()
m_count++;
}
float FPSCounter::getFPS() const
double FPSCounter::getFPS() const
{
return m_fps;
}