|
| template<typename T > |
| constexpr T | saturate (error e) noexcept |
| | Error handler that clamps the value on error.
|
| |
| template<fixed_point Fxd, std::integral I> |
| constexpr Fxd | from_raw (I val) noexcept |
| | Construct from raw value, clamp on overflow.
|
| |
| template<fixed_point Dst, std::convertible_to< Dst > Src> |
| constexpr Dst | make_fixed (Src src) noexcept |
| | Construct from numerical value, clamp on overflow.
|
| |
| template<unsigned_fixed_point Dst, std::convertible_to< Dst > Src> |
| constexpr Dst | make_ufixed (Src src) noexcept |
| | Construct from numerical value, clamp on overflow (unsigned version).
|
| |
| 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) noexcept |
| | Convenience overload.
|
| |
| template<fixed_point Dst, fixed_point Src> |
| constexpr Dst | fixed_cast (Src src) noexcept |
| | Convert between fxd::fixed types, clamp 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) noexcept |
| | 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) noexcept |
| | Convenience overload (unsigned version).
|
| |
| template<std::integral I, fixed_point Fxd> |
| constexpr I | to_int (Fxd f) noexcept |
| | Convert to integer, clamp 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, clamp on overflow.
|
| |
| template<fixed_point Dst, std::convertible_to< Dst > Src> |
| constexpr Dst & | assign (Dst &dst, Src src) noexcept |
| | Assignment, clamp on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd & | pre_inc (Fxd &f) noexcept |
| | Pre-increment (++f), clamp on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | post_inc (Fxd &f) noexcept |
| | Post-increment (f++), clamp on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd & | pre_dec (Fxd &f) noexcept |
| | Pre-decrement (--f), clamp on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | post_dec (Fxd &f) noexcept |
| | Post-decrement (f--), clamp on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | negate (Fxd f) noexcept |
| | Negate, clamp on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | add (Fxd a, Fxd b) noexcept |
| | Add, clamp on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | sub (Fxd a, Fxd b) noexcept |
| | Subtract, clamp on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | div (Fxd a, Fxd b) noexcept |
| | Divide rounding down, clamp on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | mul (Fxd a, Fxd b) noexcept |
| | Multiply rounding down, clamp on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | div (Fxd a, Fxd b) noexcept |
| | Divide rounding up, clamp on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | mul (Fxd a, Fxd b) noexcept |
| | Multiply rounding up, clamp on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | div (Fxd a, Fxd b) noexcept |
| | Divide rounding to zero, clamp on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | mul (Fxd a, Fxd b) noexcept |
| | Multiply rounding to zero, clamp on overflow.
|
| |
| template<fixed_point Fxd> |
| constexpr Fxd | abs (Fxd f) noexcept |
| | Same as fxd::abs(), clamp on overflow.
|
| |