Template Struct binary_traits< Fix< N >, Fix< M > >

Struct Documentation

template<isize N, isize M>
struct binary_traits<Fix<N>, Fix<M>>

Public Types

using Div = meta::if_t<M == 0, void, Fix<N / (M != 0 ? M : 1)>>
using Mod = meta::if_t<M == 0, void, Fix<N % (M != 0 ? M : 1)>>

Public Functions

VEG_OP (add, Add,+)
VEG_OP (sub, Sub, -)
VEG_OP (mul, Mul, *)
VEG_CMP (cmp_eq, CmpEq,==)
VEG_CMP (cmp_neq, CmpNEq, !=)
VEG_CMP (cmp_lt, CmpLT,<)
VEG_CMP (cmp_le, CmpLE,<=)
VEG_CMP (cmp_gt, CmpGT, >)
VEG_CMP (cmp_ge, CmpGE, >=)

Public Static Functions

static inline VEG_NODISCARD constexpr VEG_INLINE auto div_fn (Fix< N >, Fix< M >) VEG_NOEXCEPT -> Div
static inline VEG_NODISCARD constexpr VEG_INLINE auto mod_fn (Fix< N >, Fix< M >) VEG_NOEXCEPT -> Mod