Raven Engine v0.1
Loading...
Searching...
No Matches
Raven::Timestep Class Reference

A class representing a time step. More...

#include <Timestep.h>

Public Member Functions

 Timestep (float time=0.0f)
 Default constructor for Timestep.
 operator float () const
 Implicit conversion operator to float.
float GetSeconds () const
 Returns the time step in seconds.
float GetMilliseconds () const
 Returns the time step in milliseconds.

Detailed Description

A class representing a time step.

This class is used to represent the time elapsed between frames in a game loop. It provides methods to convert the time step into seconds or milliseconds.

Constructor & Destructor Documentation

◆ Timestep()

Raven::Timestep::Timestep ( float time = 0.0f)
inline

Default constructor for Timestep.

Initializes the time step to zero.

Member Function Documentation

◆ GetMilliseconds()

float Raven::Timestep::GetMilliseconds ( ) const
inline

Returns the time step in milliseconds.

This method converts the time step from seconds to milliseconds.

Returns
The time step in milliseconds.

◆ GetSeconds()

float Raven::Timestep::GetSeconds ( ) const
inline

Returns the time step in seconds.

This method returns the time step as a float.

Returns
The time step in seconds.

◆ operator float()

Raven::Timestep::operator float ( ) const
inline

Implicit conversion operator to float.

This allows the Timestep to be used as a float directly.

Returns
The time step in seconds.

The documentation for this class was generated from the following file: