|
|
constexpr | Fixed (long double val) noexcept |
| | Initializing constructor.
|
| |
|
constexpr | Fixed (double val) noexcept |
| | Initializing constructor.
|
| |
|
constexpr | Fixed (float val) noexcept |
| | Initializing constructor.
|
| |
|
constexpr | Fixed (unsigned long long val) noexcept |
| | Initializing constructor.
|
| |
|
constexpr | Fixed (unsigned long val) noexcept |
| | Initializing constructor.
|
| |
|
constexpr | Fixed (unsigned int val) noexcept |
| | Initializing constructor.
|
| |
|
constexpr | Fixed (long long val) noexcept |
| | Initializing constructor.
|
| |
|
constexpr | Fixed (long val) noexcept |
| | Initializing constructor.
|
| |
|
constexpr | Fixed (int val) noexcept |
| | Initializing constructor.
|
| |
|
constexpr | Fixed (short val) noexcept |
| | Initializing constructor.
|
| |
|
constexpr | Fixed (value_type val, unsigned int fraction) noexcept |
| | Initializing constructor.
|
| |
|
template<typename BT , unsigned int FB> |
| constexpr | Fixed (const Fixed< BT, FB > val) noexcept |
| | Initializing constructor.
|
| |
|
template<typename T > |
| constexpr T | ConvertTo () const noexcept |
| | Converts the value to the expressed type.
|
| |
|
constexpr CmpResult | Compare (const Fixed other) const noexcept |
| | Compares this value to the given one.
|
| |
|
constexpr | operator long double () const noexcept |
| | Long double operator.
|
| |
|
constexpr | operator double () const noexcept |
| | Double operator.
|
| |
|
constexpr | operator float () const noexcept |
| | Float operator.
|
| |
|
constexpr | operator long long () const noexcept |
| | Long long operator.
|
| |
|
constexpr | operator long () const noexcept |
| | Long operator.
|
| |
|
constexpr | operator unsigned long long () const noexcept |
| | Unsigned long long operator.
|
| |
|
constexpr | operator unsigned long () const noexcept |
| | Unsigned long operator.
|
| |
|
constexpr | operator unsigned int () const noexcept |
| | Unsigned int operator.
|
| |
|
constexpr | operator int () const noexcept |
| | int operator.
|
| |
|
constexpr | operator short () const noexcept |
| | short operator.
|
| |
|
constexpr Fixed | operator- () const noexcept |
| | Negation operator.
|
| |
|
constexpr Fixed | operator+ () const noexcept |
| | Positive operator.
|
| |
|
constexpr | operator bool () const noexcept |
| | Boolean operator.
|
| |
|
constexpr bool | operator! () const noexcept |
| | Logical not operator.
|
| |
|
constexpr Fixed & | operator+= (Fixed val) noexcept |
| | Addition assignment operator.
|
| |
|
constexpr Fixed & | operator-= (Fixed val) noexcept |
| | Subtraction assignment operator.
|
| |
|
constexpr Fixed & | operator*= (Fixed val) noexcept |
| | Multiplication assignment operator.
|
| |
|
constexpr Fixed & | operator/= (Fixed val) noexcept |
| | Division assignment operator.
|
| |
|
constexpr Fixed & | operator%= (Fixed val) noexcept |
| | Modulo operator.
|
| |
|
constexpr bool | isfinite () const noexcept |
| | Is finite.
|
| |
|
constexpr bool | isnan () const noexcept |
| | Is NaN.
|
| |
|
constexpr int | getsign () const noexcept |
| | Gets this value's sign.
|
| |
|
|
static constexpr Fixed | GetMin () noexcept |
| | Gets the min value this type is capable of expressing.
|
| |
|
static constexpr Fixed | GetInfinity () noexcept |
| | Gets an infinite value for this type.
|
| |
|
static constexpr Fixed | GetMax () noexcept |
| | Gets the max value this type is capable of expressing.
|
| |
|
static constexpr Fixed | GetNaN () noexcept |
| | Gets a NaN value for this type.
|
| |
|
static constexpr Fixed | GetNegativeInfinity () noexcept |
| | Gets the negative infinity value for this type.
|
| |
|
static constexpr Fixed | GetLowest () noexcept |
| | Gets the lowest value this type is capable of expressing.
|
| |
|
template<typename T > |
| static constexpr value_type | GetFromFloat (T val) noexcept |
| | Gets the value from a floating point value.
|
| |
|
template<typename T > |
| static constexpr value_type | GetFromSignedInt (T val) noexcept |
| | Gets the value from a signed integral value.
|
| |
|
template<typename T > |
| static constexpr value_type | GetFromUnsignedInt (T val) noexcept |
| | Gets the value from an unsigned integral value.
|
| |
template<typename BASE_TYPE, unsigned int FRACTION_BITS>
class playrho::Fixed< BASE_TYPE, FRACTION_BITS >
Template class for fixed-point numbers.
This is a fixed point type template for a given base type using a given number of fraction bits that satisfies the LiteralType named requirement.
- See also
- https://en.wikipedia.org/wiki/Fixed-point_arithmetic
-
https://en.cppreference.com/w/cpp/named_req/LiteralType