fixed: add accessor for raw int values
This commit is contained in:
parent
c2d608410b
commit
331ea58ec4
@ -62,6 +62,12 @@ fixed<INT, FRAC>::to_integral (void) const
|
|||||||
{ return m_value >> FRAC; }
|
{ return m_value >> FRAC; }
|
||||||
|
|
||||||
|
|
||||||
|
template <unsigned int INT, unsigned int FRAC>
|
||||||
|
typename fixed<INT, FRAC>::combined_type
|
||||||
|
fixed<INT, FRAC>::to_native (void) const
|
||||||
|
{ return m_value; }
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Integral operators
|
* Integral operators
|
||||||
*/
|
*/
|
||||||
|
@ -41,6 +41,7 @@ namespace util {
|
|||||||
double to_double (void) const;
|
double to_double (void) const;
|
||||||
float to_float (void) const;
|
float to_float (void) const;
|
||||||
integral_type to_integral (void) const;
|
integral_type to_integral (void) const;
|
||||||
|
combined_type to_native (void) const;
|
||||||
|
|
||||||
fixed<INT, FRAC>& operator +=(const fixed<INT, FRAC>);
|
fixed<INT, FRAC>& operator +=(const fixed<INT, FRAC>);
|
||||||
fixed<INT, FRAC>& operator -=(const fixed<INT, FRAC>);
|
fixed<INT, FRAC>& operator -=(const fixed<INT, FRAC>);
|
||||||
|
Loading…
Reference in New Issue
Block a user