|
QuasarEngine
Cross-platform 3D engine and editor
|
Time elapsed between two frames, in seconds. More...
#include <quasar/core/Timestep.h>
Public Member Functions | |
| constexpr | Timestep ()=default |
| Creates a Timestep of 0 seconds. | |
| constexpr | Timestep (float seconds) |
| Creates a Timestep of the given number of seconds. | |
| constexpr float | GetSeconds () const |
| Returns the duration in seconds. | |
| constexpr float | GetMilliseconds () const |
| Returns the duration in milliseconds. | |
| constexpr | operator float () const |
| Implicit conversion to float, returning the duration in seconds. | |
Time elapsed between two frames, in seconds.
A Timestep converts to float implicitly, so it can be used directly in computations: position += speed * timestep.
|
inlineexplicitconstexpr |
Creates a Timestep of the given number of seconds.
| seconds | Duration in seconds. |