1.8
Public Member Functions | Protected Attributes | List of all members
Ratio< T > Struct Template Reference

Creates and stores a simple ratio value. More...

Public Member Functions

constexpr Ratio (T value, int ratio) noexcept
 
constexpr operator T () const
 Get the calculated ratio value. More...
 

Protected Attributes

int m_ratio
 Ratio. More...
 
m_value
 Value. More...
 

Detailed Description

template<class T>
struct egt::v1::Ratio< T >

Creates and stores a simple ratio value.

Constructor & Destructor Documentation

◆ Ratio()

constexpr Ratio ( value,
int  ratio 
)
inlineconstexprnoexcept
Parameters
[in]valueThe value to base the ration off of.
[in]ratioRatio of value to compute.

Member Function Documentation

◆ operator T()

constexpr operator T ( ) const
inlineconstexpr

Get the calculated ratio value.

Member Data Documentation

◆ m_ratio

int m_ratio
protected

◆ m_value

T m_value
protected