26struct fmt::formatter<
NumLib::Time> : fmt::ostream_formatter
34 constexpr explicit Time(
double const time) :
value_{time} {}
66 Time const& a = *
this;
67 double const diff = b() - a();
69 double const eps = 10 * std::numeric_limits<double>::epsilon() *
70 std::max(1., (std::abs(a()) + std::abs(b())) / 2);
78 return std::weak_ordering::greater;
82 return std::weak_ordering::less;
84 return std::weak_ordering::equivalent;
89 return (*this <=> x) == std::weak_ordering::equivalent;
94 auto const precision = os.precision();
95 return os << std::setprecision(
96 std::numeric_limits<double>::max_digits10)
97 << 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