mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-30 02:17:16 +02:00
docs: Some docs updated to reflect the latest formatting changes
This commit is contained in:
@ -242,9 +242,9 @@ quantity q = (90. * km / h).in(mph);
|
||||
std::cout << "Number: " << q.numerical_value_in(mph) << "\n";
|
||||
std::cout << "Unit: " << q.unit << "\n";
|
||||
std::cout << "Dimension: " << q.dimension << "\n";
|
||||
std::println("{:{%N:.2f}%?%U}", q);
|
||||
std::println("{::N[.2f]}", q);
|
||||
std::println("{:.4f} in {} of {}", q.numerical_value_in(mph), q.unit, q.dimension);
|
||||
std::println("{:{%N:.4f} in %U of %D}", q);
|
||||
std::println("{:%N in %U of %D:N[.4f]}", q);
|
||||
```
|
||||
|
||||
```text
|
||||
|
@ -491,7 +491,7 @@ room_temp room_ref{};
|
||||
room_temp room_low = room_ref - number_of_steps * step_delta;
|
||||
room_temp room_high = room_ref + number_of_steps * step_delta;
|
||||
|
||||
std::println("Room reference temperature: {} ({}, {:{%N:.2f}%?%U})\n",
|
||||
std::println("Room reference temperature: {} ({}, {::N[.2f]})\n",
|
||||
room_ref.quantity_from_zero(),
|
||||
room_ref.in(usc::degree_Fahrenheit).quantity_from_zero(),
|
||||
room_ref.in(si::kelvin).quantity_from_zero());
|
||||
|
@ -1006,7 +1006,7 @@ TEST_CASE("localization with the 'L' specifier", "[text][fmt][localization]")
|
||||
std::locale grp2{std::locale::classic(), new group2};
|
||||
std::locale grp3{std::locale::classic(), new group3};
|
||||
|
||||
SECTION("full format {:{%N:L}%?%U} on a quantity")
|
||||
SECTION("full format on a quantity")
|
||||
{
|
||||
SECTION("default spec")
|
||||
{
|
||||
|
Reference in New Issue
Block a user