27struct fmt::formatter<
NumLib::Time> : fmt::ostream_formatter
35 constexpr explicit Time(
double const time) :
value_{time} {}
67 Time const& a = *
this;
68 double const diff = b() - a();
70 double const eps = 10 * std::numeric_limits<double>::epsilon() *
71 std::max(1., (std::abs(a()) + std::abs(b())) / 2);
79 return std::weak_ordering::greater;
83 return std::weak_ordering::less;
85 return std::weak_ordering::equivalent;
90 return (*this <=> x) == std::weak_ordering::equivalent;
95 auto const precision = os.precision();
96 return os << std::setprecision(
97 std::numeric_limits<double>::max_digits10)
98 << 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