|
constexpr | operator int () const noexcept |
|
fixed & | neg () |
|
fixed & | asr (int bits_) |
|
fixed & | lsl (int bits_) |
|
template<typename T , typename std::enable_if< std::is_integral< T >::value >::type * = nullptr> |
constexpr | fixed (T val) noexcept |
|
template<typename T , typename std::enable_if< std::is_floating_point< T >::value >::type * = nullptr> |
constexpr | fixed (T val) noexcept |
|
template<typename B , typename I , unsigned int F> |
constexpr | fixed (fixed< B, I, F > val) noexcept |
|
constexpr | fixed (int numerator_, int denominator_) noexcept |
|
template<typename T , typename std::enable_if< std::is_floating_point< T >::value >::type * = nullptr> |
constexpr | operator T () const noexcept |
|
template<typename T , typename std::enable_if< std::is_integral< T >::value >::type * = nullptr> |
constexpr | operator T () const noexcept |
|
constexpr BaseType | raw_value () const noexcept |
|
constexpr BaseType | set_raw_value (BaseType x_) noexcept |
|
constexpr fixed | operator- () const noexcept |
|
constexpr fixed | operator+ () const noexcept |
|
fixed & | operator+= (const fixed &y) noexcept |
|
template<typename I , typename std::enable_if< std::is_integral< I >::value >::type * = nullptr> |
fixed & | operator+= (I y) noexcept |
|
fixed & | operator-= (const fixed &y) noexcept |
|
template<typename I , typename std::enable_if< std::is_integral< I >::value >::type * = nullptr> |
fixed & | operator-= (I y) noexcept |
|
fixed & | operator*= (const fixed &y) noexcept |
|
template<typename I , typename std::enable_if< std::is_integral< I >::value >::type * = nullptr> |
fixed & | operator*= (I y) noexcept |
|
fixed & | operator/= (const fixed &y) noexcept |
|
template<typename I , typename std::enable_if< std::is_integral< I >::value >::type * = nullptr> |
fixed & | operator/= (I y) noexcept |
|
template<typename BaseType, typename IntermediateType, unsigned int FractionBits>
class fpm::fixed< BaseType, IntermediateType, FractionBits >
Fixed-point number type
- Template Parameters
-
BaseType | the base integer type used to store the fixed-point number. This can be a signed or unsigned type. |
IntermediateType | the integer type used to store intermediate results during calculations. |
FractionBits | the number of bits of the BaseType used to store the fraction |
template<typename BaseType , typename IntermediateType , unsigned int FractionBits>
template<unsigned int NumFractionBits, typename T , typename std::enable_if<(NumFractionBits > FractionBits)>::type * = nullptr>
static constexpr fixed fpm::fixed< BaseType, IntermediateType, FractionBits >::from_fixed_point |
( |
T | value | ) |
|
|
inlinestaticconstexprnoexcept |
Constructs a fixed-point number from another fixed-point number.
- Template Parameters
-
NumFractionBits | the number of bits used by the fraction in value. |
- Parameters
-
value | the integer fixed-point number |