From a5c1f42abe9eda9d28dfabac85497ee862ced777 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Mon, 13 Jan 2025 14:08:54 +0100 Subject: [PATCH] docs: explicit unit conversion example added to the "Symbols of common units" chapter --- docs/users_guide/framework_basics/text_output.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/users_guide/framework_basics/text_output.md b/docs/users_guide/framework_basics/text_output.md index e77d7b4a..c931028b 100644 --- a/docs/users_guide/framework_basics/text_output.md +++ b/docs/users_guide/framework_basics/text_output.md @@ -313,6 +313,21 @@ prints: Thanks to the above, it might be easier for the user to reason about the magnitude of the resulting unit and its impact on the value stored in the quantity. +!!! note + + It is important to note that this output is provided only for intermediate results of the + equations, as shown above. A user usually knows which unit should be used, and explicit + conversion can be made to achieve that. For example: + + ```cpp + std::cout << (1 * km + 1 * mi).in(km) << "\n"; + ``` + + prints: + + ```text + 2.60934 km + ``` ## `space_before_unit_symbol` customization point