ETL
0.04.19
|
Fixed-point template base class. More...
#include <_fixed.h>
Classes | |
class | raw |
Public Types | |
typedef T | value_type |
Public Member Functions | |
fixed_base () ETL_ATTRIB_INLINE | |
fixed_base (const float &f) ETL_ATTRIB_INLINE | |
fixed_base (const double &f) ETL_ATTRIB_INLINE | |
fixed_base (const long double &f) ETL_ATTRIB_INLINE | |
fixed_base (const int &i) ETL_ATTRIB_INLINE | |
fixed_base (const int &n, const int &d) ETL_ATTRIB_INLINE | |
Fraction constructor. | |
fixed_base (const _fixed &x) ETL_ATTRIB_INLINE | |
fixed_base (value_type x, raw) ETL_ATTRIB_INLINE | |
T & | data () ETL_ATTRIB_PURE ETL_ATTRIB_INLINE |
const T & | data () const ETL_ATTRIB_PURE ETL_ATTRIB_INLINE |
const _fixed & | operator+= (const _fixed &rhs) ETL_ATTRIB_INLINE |
fixed+=fixed | |
const _fixed & | operator-= (const _fixed &rhs) ETL_ATTRIB_INLINE |
fixed-=fixed | |
template<typename U > | |
const _fixed & | operator*= (const U &rhs) ETL_ATTRIB_INLINE |
template<typename U > | |
const _fixed & | operator/= (const U &rhs) ETL_ATTRIB_INLINE |
const _fixed & | operator*= (const _fixed &rhs) ETL_ATTRIB_INLINE |
fixed*=fixed | |
const _fixed & | operator/= (const _fixed &rhs) ETL_ATTRIB_INLINE |
fixed/=fixed | |
const _fixed & | operator*= (const int &rhs) ETL_ATTRIB_INLINE |
fixed*=int | |
const _fixed & | operator/= (const int &rhs) ETL_ATTRIB_INLINE |
fixed/=int | |
template<typename U > | |
_fixed | operator+ (const U &rhs) const ETL_ATTRIB_INLINE |
fixed + ... | |
template<typename U > | |
_fixed | operator- (const U &rhs) const ETL_ATTRIB_INLINE |
fixed - ... | |
template<typename U > | |
_fixed | operator* (const U &rhs) const ETL_ATTRIB_INLINE |
fixed * ... | |
template<typename U > | |
_fixed | operator/ (const U &rhs) const ETL_ATTRIB_INLINE |
fixed / ... | |
_fixed | operator+ (const _fixed &rhs) const ETL_ATTRIB_INLINE |
fixed + fixed | |
_fixed | operator- (const _fixed &rhs) const ETL_ATTRIB_INLINE |
fixed - fixed | |
_fixed | operator* (const _fixed &rhs) const ETL_ATTRIB_INLINE |
fixed * fixed | |
_fixed | operator/ (const _fixed &rhs) const ETL_ATTRIB_INLINE |
fixed / fixed | |
_fixed | operator* (const int &rhs) const ETL_ATTRIB_INLINE |
fixed * int | |
_fixed | operator/ (const int &rhs) const ETL_ATTRIB_INLINE |
fixed / int | |
_fixed | operator* (const float &rhs) const ETL_ATTRIB_INLINE |
fixed * float | |
_fixed | operator* (const double &rhs) const ETL_ATTRIB_INLINE |
fixed * double | |
_fixed | operator- () const ETL_ATTRIB_INLINE |
operator float () const ETL_ATTRIB_INLINE | |
operator double () const ETL_ATTRIB_INLINE | |
operator long double () const ETL_ATTRIB_INLINE | |
operator int () const ETL_ATTRIB_INLINE | |
operator bool () const ETL_ATTRIB_INLINE | |
_fixed | floor () const |
_fixed | ceil () const |
_fixed | round () const |
bool | operator== (const _fixed &rhs) const |
bool | operator!= (const _fixed &rhs) const |
bool | operator< (const _fixed &rhs) const |
bool | operator> (const _fixed &rhs) const |
bool | operator<= (const _fixed &rhs) const |
bool | operator>= (const _fixed &rhs) const |
Private Types | |
typedef fixed_base< T, FIXED_BITS > | _fixed |
typedef fixed_base< T, FIXED_BITS > | self_type |
Static Private Member Functions | |
static bool | _TYPE_SMALLER_THAN_INT () ETL_ATTRIB_CONST ETL_ATTRIB_INLINE |
static bool | _USING_ALL_BITS () ETL_ATTRIB_CONST ETL_ATTRIB_INLINE |
static value_type | _ONE () ETL_ATTRIB_CONST ETL_ATTRIB_INLINE |
static value_type | _F_MASK () ETL_ATTRIB_CONST ETL_ATTRIB_INLINE |
static float | _EPSILON () ETL_ATTRIB_CONST ETL_ATTRIB_INLINE |
Private Attributes | |
T | _data |
Fixed-point template base class.
========================================================================
A more detailed description needs to be written.
typedef T fixed_base< T, FIXED_BITS >::value_type |
|
private |
|
private |
fixed_base< T, FIXED_BITS >::fixed_base | ( | ) |
fixed_base< T, FIXED_BITS >::fixed_base | ( | const float & | f | ) |
fixed_base< T, FIXED_BITS >::fixed_base | ( | const double & | f | ) |
fixed_base< T, FIXED_BITS >::fixed_base | ( | const long double & | f | ) |
fixed_base< T, FIXED_BITS >::fixed_base | ( | const int & | i | ) |
fixed_base< T, FIXED_BITS >::fixed_base | ( | const int & | n, |
const int & | d | ||
) |
fixed_base< T, FIXED_BITS >::fixed_base | ( | const _fixed & | x | ) |
fixed_base< T, FIXED_BITS >::fixed_base | ( | value_type | x, |
raw | |||
) |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
T & fixed_base< T, FIXED_BITS >::data | ( | ) |
Definition at line 249 of file _fixed.h.
Referenced by fastangle::cos::cos(), fastangle::sin::get(), fastangle::cos::get(), fastangle::tan::get(), fixed_base< ETL_FIXED_TYPE, ETL_FASTANGLE_LOOKUP_RES >::operator!=(), fixed_base< ETL_FIXED_TYPE, ETL_FASTANGLE_LOOKUP_RES >::operator<(), fixed_base< ETL_FIXED_TYPE, ETL_FASTANGLE_LOOKUP_RES >::operator<=(), fixed_base< ETL_FIXED_TYPE, ETL_FASTANGLE_LOOKUP_RES >::operator==(), fixed_base< ETL_FIXED_TYPE, ETL_FASTANGLE_LOOKUP_RES >::operator>(), fixed_base< ETL_FIXED_TYPE, ETL_FASTANGLE_LOOKUP_RES >::operator>=(), fastangle::sin::sin(), and fastangle::tan::tan().
const T & fixed_base< T, FIXED_BITS >::data | ( | ) | const |
const fixed_base< T, FIXED_BITS > & fixed_base< T, FIXED_BITS >::operator+= | ( | const _fixed & | rhs | ) |
fixed+=fixed
Definition at line 262 of file _fixed.h.
References fixed_base< T, FIXED_BITS >::_data.
const fixed_base< T, FIXED_BITS > & fixed_base< T, FIXED_BITS >::operator-= | ( | const _fixed & | rhs | ) |
fixed-=fixed
Definition at line 270 of file _fixed.h.
References fixed_base< T, FIXED_BITS >::_data.
const fixed_base< T, FIXED_BITS > & fixed_base< T, FIXED_BITS >::operator*= | ( | const U & | rhs | ) |
const fixed_base< T, FIXED_BITS > & fixed_base< T, FIXED_BITS >::operator/= | ( | const U & | rhs | ) |
const fixed_base< T, FIXED_BITS > & fixed_base< T, FIXED_BITS >::operator*= | ( | const _fixed & | rhs | ) |
fixed*=fixed
Definition at line 278 of file _fixed.h.
References fixed_base< T, FIXED_BITS >::_data.
const fixed_base< T, FIXED_BITS > & fixed_base< T, FIXED_BITS >::operator/= | ( | const _fixed & | rhs | ) |
fixed/=fixed
Definition at line 293 of file _fixed.h.
References fixed_base< T, FIXED_BITS >::_data.
const fixed_base< T, FIXED_BITS > & fixed_base< T, FIXED_BITS >::operator*= | ( | const int & | rhs | ) |
const fixed_base< T, FIXED_BITS > & fixed_base< T, FIXED_BITS >::operator/= | ( | const int & | rhs | ) |
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator+ | ( | const U & | rhs | ) | const |
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator- | ( | const U & | rhs | ) | const |
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator* | ( | const U & | rhs | ) | const |
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator/ | ( | const U & | rhs | ) | const |
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator+ | ( | const _fixed & | rhs | ) | const |
fixed + fixed
Definition at line 339 of file _fixed.h.
References fixed_base< T, FIXED_BITS >::_data.
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator- | ( | const _fixed & | rhs | ) | const |
fixed - fixed
Definition at line 348 of file _fixed.h.
References fixed_base< T, FIXED_BITS >::_data.
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator* | ( | const _fixed & | rhs | ) | const |
fixed * fixed
Definition at line 357 of file _fixed.h.
References fixed_base< T, FIXED_BITS >::_data.
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator/ | ( | const _fixed & | rhs | ) | const |
fixed / fixed
Definition at line 367 of file _fixed.h.
References fixed_base< T, FIXED_BITS >::_data.
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator* | ( | const int & | rhs | ) | const |
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator/ | ( | const int & | rhs | ) | const |
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator* | ( | const float & | rhs | ) | const |
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator* | ( | const double & | rhs | ) | const |
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::operator- | ( | ) | const |
Definition at line 459 of file _fixed.h.
References fixed_base< T, FIXED_BITS >::_data.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::floor | ( | ) | const |
Definition at line 497 of file _fixed.h.
References fixed_base< T, FIXED_BITS >::_data.
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::ceil | ( | ) | const |
Definition at line 505 of file _fixed.h.
References fixed_base< T, FIXED_BITS >::_data.
fixed_base< T, FIXED_BITS > fixed_base< T, FIXED_BITS >::round | ( | ) | const |
Definition at line 516 of file _fixed.h.
References fixed_base< T, FIXED_BITS >::_data.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
Definition at line 105 of file _fixed.h.
Referenced by fixed_base< T, FIXED_BITS >::ceil(), fixed_base< T, FIXED_BITS >::floor(), fixed_base< T, FIXED_BITS >::operator*(), fixed_base< T, FIXED_BITS >::operator*=(), fixed_base< T, FIXED_BITS >::operator+(), fixed_base< T, FIXED_BITS >::operator+=(), fixed_base< T, FIXED_BITS >::operator-(), fixed_base< T, FIXED_BITS >::operator-=(), fixed_base< T, FIXED_BITS >::operator/(), fixed_base< T, FIXED_BITS >::operator/=(), and fixed_base< T, FIXED_BITS >::round().