mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-01 03:14:29 +02:00
fix: improved text formatting in examples
This commit is contained in:
@@ -58,7 +58,8 @@ struct Ship {
|
||||
template<Unit auto... Us, Quantity Q>
|
||||
auto fmt_line(const Q& q)
|
||||
{
|
||||
return MP_UNITS_STD_FMT::format("{:22}", q) + (MP_UNITS_STD_FMT::format(",{:20}", value_cast<Us>(q)) + ...);
|
||||
return MP_UNITS_STD_FMT::format("{:22:N[.2f]}", q) +
|
||||
(MP_UNITS_STD_FMT::format(",{:20:N[.2f]}", value_cast<Us>(q)) + ...);
|
||||
}
|
||||
|
||||
// Print the ship details in the units as defined in the Ship struct, in other si::imperial units, and in SI
|
||||
|
Reference in New Issue
Block a user