From 5ad14e9492a39a70dd123ade77d58d6f4db4cd4b Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Wed, 19 Jun 2024 15:53:48 +0200 Subject: [PATCH] refactor(example): `strong_angular_quantities` example updated --- example/strong_angular_quantities.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/example/strong_angular_quantities.cpp b/example/strong_angular_quantities.cpp index d7f62dbe..58ee1e2e 100644 --- a/example/strong_angular_quantities.cpp +++ b/example/strong_angular_quantities.cpp @@ -37,14 +37,13 @@ int main() { using namespace mp_units; using namespace mp_units::si::unit_symbols; - using namespace mp_units::angular::unit_symbols; using mp_units::angular::unit_symbols::deg; using mp_units::angular::unit_symbols::rad; - const auto lever = isq_angle::position_vector(20 * cm); - const auto force = isq_angle::force(500 * N); - const auto angle = isq_angle::angular_measure(90. * deg); - const auto torque = isq_angle::torque(lever * force * angular::sin(angle) / (1 * isq_angle::cotes_angle)); + const quantity lever = isq_angle::position_vector(20 * cm); + const quantity force = isq_angle::force(500 * N); + const quantity angle = isq_angle::angular_measure(90. * deg); + const quantity torque = isq_angle::torque(lever * force * angular::sin(angle) / (1 * isq_angle::cotes_angle)); std::cout << "Applying a perpendicular force of " << force << " to a " << lever << " long lever results in " << torque.in(N * m / rad) << " of torque.\n";