PixelBullet  0.0.1
A C++ game engine
Loading...
Searching...
No Matches
PixelBullet::Duration Class Reference

A lightweight duration class that holds a time span in seconds. More...

#include <Duration.hpp>

Public Member Functions

 Duration (float seconds=0.0f)
 Constructs a duration from seconds.
 
 operator float () const
 Implicit conversion to float (seconds).
 
float AsSeconds () const
 Returns the duration in seconds.
 
float AsMilliseconds () const
 Returns the duration in milliseconds.
 

Detailed Description

A lightweight duration class that holds a time span in seconds.

This class makes it easy to convert between seconds and milliseconds.

Constructor & Destructor Documentation

◆ Duration()

PixelBullet::Duration::Duration ( float seconds = 0.0f)

Constructs a duration from seconds.

Member Function Documentation

◆ AsMilliseconds()

float PixelBullet::Duration::AsMilliseconds ( ) const

Returns the duration in milliseconds.

◆ AsSeconds()

float PixelBullet::Duration::AsSeconds ( ) const

Returns the duration in seconds.

◆ operator float()

PixelBullet::Duration::operator float ( ) const

Implicit conversion to float (seconds).


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