Skip to content

Commit

Permalink
docs: titles added to some important admonitions
Browse files Browse the repository at this point in the history
  • Loading branch information
mpusz committed Oct 25, 2023
1 parent d824be6 commit ffbbd38
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
4 changes: 2 additions & 2 deletions docs/users_guide/framework_basics/quantity_arithmetics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docs/users_guide/framework_basics/text_output.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/users_guide/framework_basics/the_affine_space.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit ffbbd38

Please sign in to comment.