diff --git a/fixed.cpp b/fixed.cpp index 55de8b07..bc20e843 100644 --- a/fixed.cpp +++ b/fixed.cpp @@ -62,6 +62,12 @@ fixed::to_integral (void) const { return m_value >> FRAC; } +template +typename fixed::combined_type +fixed::to_native (void) const + { return m_value; } + + /* * Integral operators */ diff --git a/fixed.hpp b/fixed.hpp index c9dc1d0c..56c08cab 100644 --- a/fixed.hpp +++ b/fixed.hpp @@ -41,6 +41,7 @@ namespace util { double to_double (void) const; float to_float (void) const; integral_type to_integral (void) const; + combined_type to_native (void) const; fixed& operator +=(const fixed); fixed& operator -=(const fixed);