12 return ( a > 0 ) ? std::int64_t( a + T{0.5} ) : std::int64_t( a - T{0.5} );
15 template <
int ticks_per_unit >
21 static constexpr
rep eps = 1.0 / ticks_per_unit;
35 count_ += other.count_;
46 return count_ == other.count_;
51 return !( *
this == other );
56 return count_ < other.count_;
61 return count_ <= other.count_;
71 return from_count( std::numeric_limits< internal_rep >::max() - ticks_per_unit );
78 template <
int ticks_per_unit >
85 template <
int ticks_per_unit >
86 std::ostream& operator<<( std::ostream& os, fixed_point_type< ticks_per_unit > value )
94 template <
int ticks_per_unit >
static constexpr sequencer::fixed_point_type< ticks_per_unit > max() noexcept
Definition: fixed_point_type.hpp:98
constexpr bool operator!=(fixed_point_type other) const noexcept
Definition: fixed_point_type.hpp:49
constexpr fixed_point_type operator-() const noexcept
Definition: fixed_point_type.hpp:39
Definition: beat_duration.hpp:106
constexpr double to_double() const noexcept
Definition: fixed_point_type.hpp:28
double rep
Definition: fixed_point_type.hpp:19
static constexpr fixed_point_type max() noexcept
Definition: fixed_point_type.hpp:69
constexpr beat_duration operator+(beat_duration lhs, beat_duration rhs) noexcept
Definition: beat_duration.hpp:60
constexpr fixed_point_type & operator+=(fixed_point_type other) noexcept
Definition: fixed_point_type.hpp:33
constexpr bool operator<(fixed_point_type other) const noexcept
Definition: fixed_point_type.hpp:54
static constexpr rep eps
Definition: fixed_point_type.hpp:21
Definition: fixed_point_type.hpp:16
static constexpr fixed_point_type from_count(internal_rep count) noexcept
Definition: fixed_point_type.hpp:64
constexpr std::int64_t constexpr_round(T a) noexcept
Definition: fixed_point_type.hpp:10
constexpr bool operator<=(fixed_point_type other) const noexcept
Definition: fixed_point_type.hpp:59
std::int64_t internal_rep
Definition: fixed_point_type.hpp:20
constexpr fixed_point_type(rep value=0) noexcept
Definition: fixed_point_type.hpp:23
constexpr bool operator==(fixed_point_type other) const noexcept
Definition: fixed_point_type.hpp:44