|
| void | except (error e) |
| | Error handler that throws exceptions on error.
|
| |
| template<fixed_point Fxd, std::integral I> |
| constexpr Fxd | from_raw (I val) |
| | Construct from raw value, throw on overflow.
|
| |
| template<fixed_point Dst, std::convertible_to< Dst > Src> |
| constexpr Dst | make_fixed (Src src) |
| | Construct from numerical value, throw on overflow.
|
| |
| template<int Int, int Frac, typename Raw = detail::select_int_t<Int + Frac>, std::convertible_to< fixed< Int, Frac, Raw > > Src> |
| constexpr fixed< Int, Frac, Raw > | make_fixed (Src src) |
| | Convenience overload.
|
| |
| template<int Int, int Frac, typename Raw = detail::select_uint_t<Int + Frac>, std::convertible_to< fixed< Int, Frac, Raw > > Src> |
| constexpr fixed< Int, Frac, Raw > | make_ufixed (Src src) |
| | Convenience overload (unsigned version).
|
| |
| template<fixed_point Dst, fixed_point Src> |
| constexpr Dst | fixed_cast (Src src) |
| | Convert between fxd::fixed types, throw on overflow.
|
| |
| template<int Int, int Frac, typename Raw = detail::select_int_t<Int + Frac>, fixed_point Src> |
| constexpr fixed< Int, Frac, Raw > | fixed_cast (Src src) |
| | Convenience overload.
|
| |
| template<int Int, int Frac, typename Raw = detail::select_uint_t<Int + Frac>, fixed_point Src> |
| constexpr fixed< Int, Frac, Raw > | ufixed_cast (Src src) |
| | Convenience overload (unsigned version).
|
| |
| template<std::integral I, fixed_point Fxd> |
| I | to_int (Fxd f) |
| | Convert to integer, throw on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr detail::select_int_for< Fxd::int_bits, typename Fxd::raw_type > | to_int (Fxd f) |
| | Convert to the natural integer type, throw on overflow.
|
| |
| template<fixed_point Dst, std::convertible_to< Dst > Src> |
| constexpr Dst & | assign (Dst &dst, Src src) |
| | Assignment, throw on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd & | pre_inc (Fxd &f) |
| | Pre-increment (++f), throw on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | post_inc (Fxd &f) |
| | Post-increment (f++), throw on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd & | pre_dec (Fxd &f) |
| | Pre-decrement (--f), throw on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | post_dec (Fxd &f) |
| | Post-decrement (f--), throw on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | negate (Fxd f) |
| | Negate, throw on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | add (Fxd a, Fxd b) |
| | Add, throw on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | sub (Fxd a, Fxd b) |
| | Subtract, throw on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | div (Fxd a, Fxd b) |
| | Divide rounding down, throw on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | mul (Fxd a, Fxd b) |
| | Multiply rounding down, throw on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | div (Fxd a, Fxd b) |
| | Divide rounding up, throw on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | mul (Fxd a, Fxd b) |
| | Multiply rounding up, throw on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | div (Fxd a, Fxd b) |
| | Divide rounding to zero, throw on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | mul (Fxd a, Fxd b) |
| | Multiply rounding to zero, throw on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | abs (Fxd f) |
| | Same as fxd::abs(), throw on overflow.
|
| |