20struct fmt::formatter<
NumLib::Time> : fmt::ostream_formatter
28 constexpr explicit Time(
double const time) :
value_{time} {}
60 Time const& a = *
this;
61 double const diff = b() - a();
63 double const eps = 10 * std::numeric_limits<double>::epsilon() *
64 std::max(1., (std::abs(a()) + std::abs(b())) / 2);
72 return std::weak_ordering::greater;
76 return std::weak_ordering::less;
78 return std::weak_ordering::equivalent;
83 return (*this <=> x) == std::weak_ordering::equivalent;
88 auto const precision = os.precision();
89 return os << std::setprecision(
90 std::numeric_limits<double>::max_digits10)
91 << t() << std::setprecision(precision);
constexpr Time(double const time)
constexpr double operator()() const
constexpr bool operator==(Time const &x) const
friend std::ostream & operator<<(std::ostream &os, Time const &t)
constexpr Time & operator+=(double const increment)
constexpr Time operator-(double const decrement) const
constexpr std::weak_ordering operator<=>(Time const &b) const
constexpr Time & operator-=(double const decrement)
constexpr Time operator+(double const increment) const