15 #ifndef PAAL_PRETTY_STREAM_HPP
16 #define PAAL_PRETTY_STREAM_HPP
33 auto r =
static_cast<int>(std::round(x));
37 return std::to_string(r);
39 return std::to_string(x);
52 return std::to_string(t);
71 m_epsilon{ epsilon } {}
81 int r = std::round(x);
85 return std::to_string(r);
87 return std::to_string(x);
104 using Manipulator = Stream & (Stream &);
133 template <
typename Stream>
139 #endif // PAAL_PRETTY_STREAM_HPP
pretty_stream< Stream > & operator<<(T &&t)
operator<< generic
std::string pretty_to_string(double x, double epsilon=1e-9)
pretty_to_string for double
pretty_stream< Stream > make_pretty_stream(Stream &s, double epsilon=1e-9)
make for pretty_stream
pretty_stream stream that uses pretty_to_string method
std::string pretty_to_string(double x, double epsilon=1e-9)
pretty_to_string prints double which is close to int as int
pretty_stream(Stream &stream, double epsilon=1e-9)
constructor
bool e(T a, T b) const
equals