feat(example): angle examples extended with degrees and rotations

This commit is contained in:
Mateusz Pusz
2022-08-31 12:57:56 +02:00
parent 8b534c8d8b
commit 7caf14b8fe
3 changed files with 15 additions and 6 deletions
+5 -2
View File
@@ -28,13 +28,16 @@
int main()
{
using namespace units;
using namespace units::isq;
using namespace units::aliases::isq::si;
const auto torque = N_m_per_rad<>(20.0);
const auto torque = N_m_per_rad<>(20.0 / std::numbers::pi);
const auto energy = J<>(20.0);
units::Angle auto angle = energy / torque;
Angle auto angle = energy / torque;
std::cout << angle << '\n';
std::cout << quantity_cast<rotation>(angle) << '\n';
std::cout << quantity_cast<degree>(angle) << '\n';
}