diff --git a/docs/use_cases/extensions.rst b/docs/use_cases/extensions.rst index fd9db565..fd2281a8 100644 --- a/docs/use_cases/extensions.rst +++ b/docs/use_cases/extensions.rst @@ -258,14 +258,14 @@ Even though the base dimension of ``si::fps`` is defined in terms of ``si::metre`` foot is preserved as the base unit of length in both systems:: constexpr auto fps_yard = fps::length(1.); - constexpr auto fps_area = quantity_cast(fps_yard * fps_yard); - std::cout << fps_yard << "\n"; // 1 yd - std::cout << fps_area << "\n"; // 9 ft² + constexpr auto fps_area = fps_yard * fps_yard; + std::cout << fps_yard << "\n"; // 1 yd + std::cout << quantity_cast(fps_area) << "\n"; // 9 ft² constexpr auto si_fps_yard = si::fps::length(1.); - constexpr auto si_fps_area = quantity_cast(si_fps_yard * si_fps_yard); - std::cout << si_fps_yard << "\n"; // 1 yd - std::cout << si_fps_area << "\n"; // 9 ft² + constexpr auto si_fps_area = si_fps_yard * si_fps_yard; + std::cout << si_fps_yard << "\n"; // 1 yd + std::cout << quantity_cast(si_fps_area) << "\n"; // 9 ft² In most cases we want conversions between systems and that is why nearly all systems provided with this library are implemented in terms on the :term:`SI` diff --git a/docs/use_cases/unknown_dimensions.rst b/docs/use_cases/unknown_dimensions.rst index d23e227f..f3e3140d 100644 --- a/docs/use_cases/unknown_dimensions.rst +++ b/docs/use_cases/unknown_dimensions.rst @@ -52,7 +52,7 @@ dimensions used in the division operation: static_assert(std::is_same_v, exponent>>); static_assert(std::is_same_v>); + scaled_unit, exponent>>>>); .. important:: @@ -81,7 +81,7 @@ this particular unknown derived dimension. In case we would like to print the result in terms of base units we can simply do the following:: - auto s = quantity_cast(result); + auto s = quantity_cast(result); std::cout << "Speed: " << s << '\n'; // prints 'Speed: 20 m/s' .. seealso::