mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-01 03:14:29 +02:00
refactor(example): strong_angular_quantities
example updated
This commit is contained in:
@@ -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";
|
||||
|
Reference in New Issue
Block a user