diff --git a/docs/blog/posts/isq-part-3-modeling-isq.md b/docs/blog/posts/isq-part-3-modeling-isq.md index a2ed0864..58e21107 100644 --- a/docs/blog/posts/isq-part-3-modeling-isq.md +++ b/docs/blog/posts/isq-part-3-modeling-isq.md @@ -150,8 +150,8 @@ flowchart TD path_length --- distance["distance"] distance --- radial_distance["radial_distance"] length --- wavelength["wavelength"] - length --- position_vector["position_vector
{vector}"] length --- displacement["displacement
{vector}"] + displacement --- position_vector["position_vector"] radius --- radius_of_curvature["radius_of_curvature"] ``` diff --git a/docs/blog/posts/isq-part-4-implemeting-isq.md b/docs/blog/posts/isq-part-4-implemeting-isq.md index aff8f285..61dca347 100644 --- a/docs/blog/posts/isq-part-4-implemeting-isq.md +++ b/docs/blog/posts/isq-part-4-implemeting-isq.md @@ -49,8 +49,8 @@ flowchart TD path_length --- distance["distance"] distance --- radial_distance["radial_distance"] length --- wavelength["wavelength"] - length --- position_vector["position_vector
{vector}"] length --- displacement["displacement
{vector}"] + displacement --- position_vector["position_vector"] radius --- radius_of_curvature["radius_of_curvature"] ``` @@ -74,8 +74,8 @@ inline constexpr auto arc_length = path_length; inline constexpr struct distance final : quantity_spec {} distance; inline constexpr struct radial_distance final : quantity_spec {} radial_distance; inline constexpr struct wavelength final : quantity_spec {} wavelength; -inline constexpr struct position_vector final : quantity_spec {} position_vector; inline constexpr struct displacement final : quantity_spec {} displacement; +inline constexpr struct position_vector final : quantity_spec {} position_vector; ``` Thanks to the expressivity and power of C++ templates, we can specify all quantity properties diff --git a/docs/users_guide/framework_basics/character_of_a_quantity.md b/docs/users_guide/framework_basics/character_of_a_quantity.md index 2ce5a166..a47eb760 100644 --- a/docs/users_guide/framework_basics/character_of_a_quantity.md +++ b/docs/users_guide/framework_basics/character_of_a_quantity.md @@ -97,22 +97,22 @@ enumeration can be appended to the `quantity_spec` describing such a quantity ty === "C++23" ```cpp - inline constexpr struct position_vector final : quantity_spec {} position_vector; inline constexpr struct displacement final : quantity_spec {} displacement; + inline constexpr struct position_vector final : quantity_spec {} position_vector; ``` === "C++20" ```cpp - inline constexpr struct position_vector final : quantity_spec {} position_vector; inline constexpr struct displacement final : quantity_spec {} displacement; + inline constexpr struct position_vector final : quantity_spec {} position_vector; ``` === "Portable" ```cpp - QUANTITY_SPEC(position_vector, length, quantity_character::vector); QUANTITY_SPEC(displacement, length, quantity_character::vector); + QUANTITY_SPEC(position_vector, displacement); ``` With the above, all the quantities derived from `position_vector` or `displacement` will have a correct diff --git a/docs/users_guide/framework_basics/systems_of_quantities.md b/docs/users_guide/framework_basics/systems_of_quantities.md index 3c24801a..f5df4d82 100644 --- a/docs/users_guide/framework_basics/systems_of_quantities.md +++ b/docs/users_guide/framework_basics/systems_of_quantities.md @@ -109,8 +109,8 @@ flowchart TD path_length --- distance["distance"] distance --- radial_distance["radial_distance"] length --- wavelength["wavelength"] - length --- position_vector["position_vector
{vector}"] length --- displacement["displacement
{vector}"] + displacement --- position_vector["position_vector"] radius --- radius_of_curvature["radius_of_curvature"] ``` @@ -164,8 +164,8 @@ For example, here is how the above quantity kind tree can be modeled in the libr inline constexpr struct distance final : quantity_spec {} distance; inline constexpr struct radial_distance final : quantity_spec {} radial_distance; inline constexpr struct wavelength final : quantity_spec {} wavelength; - inline constexpr struct position_vector final : quantity_spec {} position_vector; inline constexpr struct displacement final : quantity_spec {} displacement; + inline constexpr struct position_vector final : quantity_spec {} position_vector; ``` === "C++20" @@ -186,8 +186,8 @@ For example, here is how the above quantity kind tree can be modeled in the libr inline constexpr struct distance final : quantity_spec {} distance; inline constexpr struct radial_distance final : quantity_spec {} radial_distance; inline constexpr struct wavelength final : quantity_spec {} wavelength; - inline constexpr struct position_vector final : quantity_spec {} position_vector; inline constexpr struct displacement final : quantity_spec {} displacement; + inline constexpr struct position_vector final : quantity_spec {} position_vector; ``` === "Portable" @@ -208,8 +208,8 @@ For example, here is how the above quantity kind tree can be modeled in the libr QUANTITY_SPEC(distance, path_length); QUANTITY_SPEC(radial_distance, distance); QUANTITY_SPEC(wavelength, length); - QUANTITY_SPEC(position_vector, length, quantity_character::vector); QUANTITY_SPEC(displacement, length, quantity_character::vector); + QUANTITY_SPEC(position_vector, displacement); ``` !!! note diff --git a/src/systems/include/mp-units/systems/isq/space_and_time.h b/src/systems/include/mp-units/systems/isq/space_and_time.h index a123f6dd..3061eaa3 100644 --- a/src/systems/include/mp-units/systems/isq/space_and_time.h +++ b/src/systems/include/mp-units/systems/isq/space_and_time.h @@ -42,8 +42,8 @@ QUANTITY_SPEC(thickness, width); QUANTITY_SPEC(diameter, width); QUANTITY_SPEC(distance, path_length); QUANTITY_SPEC(radial_distance, distance); -QUANTITY_SPEC(position_vector, length, quantity_character::vector); QUANTITY_SPEC(displacement, length, quantity_character::vector); +QUANTITY_SPEC(position_vector, displacement); QUANTITY_SPEC(radius_of_curvature, radius); QUANTITY_SPEC(curvature, inverse(radius_of_curvature)); QUANTITY_SPEC(volume, pow<3>(length));