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

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

#include <utils.h>

Public Member Functions

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

Protected Attributes

int m_ratio
 Ratio.
 
m_value
 Value.
 

Detailed Description

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

Creates and stores a simple ratio value.

Constructor & Destructor Documentation

◆ Ratio()

template<class T >
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()

template<class T >
constexpr operator T ( ) const
inlineconstexpr

Get the calculated ratio value.

Member Data Documentation

◆ m_ratio

template<class T >
int m_ratio
protected

◆ m_value

template<class T >
T m_value
protected