fixed: rename integral methods as integer

This commit is contained in:
Danny Robson 2015-02-06 19:00:47 +11:00
parent 5ad7d05fd4
commit 6fee487bc0
2 changed files with 8 additions and 9 deletions

View File

@ -61,7 +61,7 @@ fixed<I,E>::to_float (void) const
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
template <unsigned I, unsigned E> template <unsigned I, unsigned E>
typename fixed<I,E>::uint_t typename fixed<I,E>::uint_t
fixed<I,E>::to_integral (void) const fixed<I,E>::to_integer (void) const
{ {
return m_value >> E; return m_value >> E;
} }
@ -88,9 +88,9 @@ fixed<I,E>::from_native (uint_t i)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
template <unsigned I, unsigned E> template <unsigned I, unsigned E>
typename fixed<I,E>::uint_t typename fixed<I,E>::uint_t
fixed<I,E>::to_integral (uint_t v) fixed<I,E>::to_integer (uint_t n)
{ {
return v >> E; return n >> E;
} }

View File

@ -35,14 +35,13 @@ namespace util {
fixed (float); fixed (float);
fixed (uint_t); fixed (uint_t);
double to_double (void) const; double to_double (void) const;
float to_float (void) const; float to_float (void) const;
uint_t to_integral (void) const; uint_t to_integer (void) const;
uint_t to_native (void) const; uint_t to_native (void) const;
static fixed<I,E> from_native (uint_t); static fixed<I,E> from_native (uint_t);
static uint_t to_integer (uint_t);
static uint_t to_integral (uint_t);
fixed<I,E>& operator +=(const fixed<I,E>); fixed<I,E>& operator +=(const fixed<I,E>);
fixed<I,E>& operator -=(const fixed<I,E>); fixed<I,E>& operator -=(const fixed<I,E>);