refactor: examples refactored to benefit from the latest features

This commit is contained in:
Mateusz Pusz
2023-02-14 12:58:54 +01:00
parent 079e640614
commit e98215c347
9 changed files with 29 additions and 33 deletions

View File

@ -132,12 +132,12 @@ void example()
using namespace mp_units::si::unit_symbols;
const auto a = isq::acceleration(measurement{9.8, 0.1} * (m / s2));
const auto t = isq::time(measurement{1.2, 0.1} * s);
const auto t = measurement{1.2, 0.1} * s;
const QuantityOf<isq::velocity> auto v = a * t;
std::cout << a << " * " << t << " = " << v << " = " << v[km / h] << '\n';
const auto length = isq::length(measurement{123., 1.} * m);
const auto length = measurement{123., 1.} * m;
std::cout << "10 * " << length << " = " << 10 * length << '\n';
}