diff --git a/docs/framework/basic_concepts.rst b/docs/framework/basic_concepts.rst index 036b60b1..5406f90a 100644 --- a/docs/framework/basic_concepts.rst +++ b/docs/framework/basic_concepts.rst @@ -4,7 +4,7 @@ Basic Concepts ============== The most important concepts in the library are `Unit`, `Dimension`, -`Quantity` and `QuantityPoint`: +`Quantity`, and `QuantityPoint`: .. image:: /_static/img/concepts.png :align: center diff --git a/docs/framework/conversions_and_casting.rst b/docs/framework/conversions_and_casting.rst index 71712d9f..f72c4d7c 100644 --- a/docs/framework/conversions_and_casting.rst +++ b/docs/framework/conversions_and_casting.rst @@ -90,10 +90,9 @@ once and leave the rest intact: - line #3 sets only a representation type to the type provided by the user. `quantity_point_cast` takes anything that works for `quantity_point` -or a specific target `quantity_point`: +or a specific target `quantity_point`:: - std::cout << "Point: " << quantity_point_cast(d) - << '\n'; + std::cout << "Point: " << quantity_point_cast(d) << '\n'; .. seealso:: diff --git a/docs/framework/dimensions.rst b/docs/framework/dimensions.rst index 8d17a720..6185c939 100644 --- a/docs/framework/dimensions.rst +++ b/docs/framework/dimensions.rst @@ -81,21 +81,24 @@ The result will always be a quantity point of the same dimension: .. code-block:: :emphasize-lines: 3 + Length auto dist1 = 2q_m; Length auto dist2 = 1q_m; auto res1 = dist1 - quantity_point{dist2}; // ERROR -We can also substract two quantity points. +We can also subtract two quantity points. The result is a relative quantity of the same dimension: .. code-block:: :emphasize-lines: 3 + Length auto dist1 = 2q_m; Length auto dist2 = 1q_m; Length auto res1 = quantity_point{dist1} - quantity_point{dist2}; That's it! You can't multiply nor divide quantity points with anything else. + Base Dimensions --------------- diff --git a/docs/framework/quantity_points.rst b/docs/framework/quantity_points.rst index 58d95e56..9688c509 100644 --- a/docs/framework/quantity_points.rst +++ b/docs/framework/quantity_points.rst @@ -31,10 +31,11 @@ the value to the `quantity_point` class template explicit constructor:: Differences to quantity ----------------------- -Unlike `quantity`, the library provides -- no helper aliases for quantity points, such as `length_point`, +Unlike `quantity`, the library provides: + +- no helper aliases for quantity points, such as ``length_point``, - no UDLs for quantity points, -- no dimension-specific concepts, such as `LengthPoint` +- no dimension-specific concepts, such as ``LengthPoint`` (there's the dimension-agnostic `QuantityPoint`), - a more limited set of operations on quantity points (see the :ref:`Conversions and Casting` chapter) diff --git a/docs/use_cases/legacy_interfaces.rst b/docs/use_cases/legacy_interfaces.rst index 96bcf029..d27b26c3 100644 --- a/docs/use_cases/legacy_interfaces.rst +++ b/docs/use_cases/legacy_interfaces.rst @@ -5,7 +5,7 @@ Working with Legacy Interfaces In case we are working with a legacy/unsafe interface we may be forced to extract the :term:`value of a quantity` with :func:`quantity::count()` or to -extract the :term:`value of a quantity_point` with :func:`quantity_point::relative()` +extract the value of a `quantity_point` with :func:`quantity_point::relative()` and pass it to the library's output: .. code-block:: @@ -37,7 +37,7 @@ and pass it to the library's output: legacy::print_eta(quantity_cast(v).count()); } - template + template requires Length void set_path_position(QP p) {