QuasarEngine
Cross-platform 3D engine and editor
Toggle main menu visibility
Loading...
Searching...
No Matches
Timestep.h
Go to the documentation of this file.
1
#pragma once
2
7
8
namespace
Quasar
9
{
14
class
Timestep
15
{
16
public
:
18
constexpr
Timestep
() =
default
;
19
22
constexpr
explicit
Timestep
(
float
seconds) : m_Seconds(seconds) {}
23
25
constexpr
float
GetSeconds
()
const
{
return
m_Seconds; }
26
28
constexpr
float
GetMilliseconds
()
const
{
return
m_Seconds * 1000.0f; }
29
31
constexpr
operator
float()
const
{
return
m_Seconds; }
32
33
private
:
34
float
m_Seconds = 0.0f;
35
};
36
}
Quasar::Timestep::Timestep
constexpr Timestep()=default
Creates a Timestep of 0 seconds.
Quasar::Timestep::Timestep
constexpr Timestep(float seconds)
Creates a Timestep of the given number of seconds.
Definition
Timestep.h:22
Quasar::Timestep::GetMilliseconds
constexpr float GetMilliseconds() const
Returns the duration in milliseconds.
Definition
Timestep.h:28
Quasar::Timestep::GetSeconds
constexpr float GetSeconds() const
Returns the duration in seconds.
Definition
Timestep.h:25
Quasar
Contains all the engine code.
quasar
core
Timestep.h
Generated by
1.18.0