From ffbbd3848c3e64c6c9c5f682a395f4cb9771a753 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Wed, 25 Oct 2023 14:14:26 +0200 Subject: [PATCH] docs: titles added to some important admonitions --- .../framework_basics/dimensionless_quantities.md | 2 +- docs/users_guide/framework_basics/quantity_arithmetics.md | 4 ++-- docs/users_guide/framework_basics/text_output.md | 6 +++--- docs/users_guide/framework_basics/the_affine_space.md | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/users_guide/framework_basics/dimensionless_quantities.md b/docs/users_guide/framework_basics/dimensionless_quantities.md index 1cdddf19..56961d07 100644 --- a/docs/users_guide/framework_basics/dimensionless_quantities.md +++ b/docs/users_guide/framework_basics/dimensionless_quantities.md @@ -138,7 +138,7 @@ quantities deriving from them. As we observed above, the most common unit for dimensionless quantities is `one`. It has the ratio of `1` and does not output any textual symbol. -!!! important +!!! important "Important: `one` is an identity" A unit `one` is special in the entire type system of units as it is considered to be [an identity operand in the unit expression templates](interface_introduction.md#identities). diff --git a/docs/users_guide/framework_basics/quantity_arithmetics.md b/docs/users_guide/framework_basics/quantity_arithmetics.md index c2d8c807..aef75de9 100644 --- a/docs/users_guide/framework_basics/quantity_arithmetics.md +++ b/docs/users_guide/framework_basics/quantity_arithmetics.md @@ -5,7 +5,7 @@ If we think about it, the `quantity` class template is just a "smart" numeric wrapper. It exposes properly constrained set of arithmetic operations on one or two operands. -!!! important +!!! important "Important: `quantity` propagates the underlying interface" Every single arithmetic operator is exposed by the `quantity` class template only if the underlying representation type provides it as well and its implementation has proper @@ -166,7 +166,7 @@ dimensionless kind. 2. The resulting quantity of the LHS is `0 * dimensionless[h / min]`. To be consistent with the division of different quantity types, we do not convert quantity values to a common unit before the division. -!!! important "Beware of integral division" +!!! important "Important: Beware of integral division" The physical units library can't do any runtime branching logic for the division operator. All logic has to be done at compile-time when the actual values are not known, and the quantity types diff --git a/docs/users_guide/framework_basics/text_output.md b/docs/users_guide/framework_basics/text_output.md index 42a3b8ca..ceb5626c 100644 --- a/docs/users_guide/framework_basics/text_output.md +++ b/docs/users_guide/framework_basics/text_output.md @@ -66,10 +66,10 @@ The text output will always print the [value of a quantity](../../appendix/gloss typically followed by a space and then the symbol of a [unit](../../appendix/glossary.md#unit) associated with this quantity. -!!! important +!!! important "Important: Don't assume a unit" - Remember that when we deal with a quantity of an "unknown" `auto` type, it is a good practice - to always [convert the unit to the expected one](value_conversions.md#value-conversions) + Remember that when we deal with a quantity of an "unknown" (e.g. `auto`) type, it is a good + practice to always [convert the unit to the expected one](value_conversions.md#value-conversions) before passing it to the text output: ```cpp diff --git a/docs/users_guide/framework_basics/the_affine_space.md b/docs/users_guide/framework_basics/the_affine_space.md index 9ae1824c..bc63569d 100644 --- a/docs/users_guide/framework_basics/the_affine_space.md +++ b/docs/users_guide/framework_basics/the_affine_space.md @@ -341,7 +341,7 @@ The following operations are not allowed in the affine space: - How to subtract a point on our trip to CppCon measured relatively to our home location from a point measured relative to the center of the Solar System? -!!! important +!!! important "Important: The affine space improves safety" The usage of `quantity_point` and affine space types in general, improves expressiveness and type-safety of the code we write.