Files
mp-units/example/experimental_angle.cpp
Andy Little f281e417e2 Experimental branch using angle as a dimension.
Added dim_angle, Angle concept etc.
Not really for merging, but fun to play with.(The main problem is that it doesnt conform to SI)
See https://github.com/mpusz/units/issues/99
Could try adding degrees etc in same way as non-si units
2020-05-20 21:34:04 +02:00

23 lines
378 B
C++

#include <units/physical/si/length.h>
#include <units/physical/si/torque.h>
#include <units/physical/si/energy.h>
#include <units/format.h>
#include <iostream>
using namespace units;
using namespace units::physical::si::literals;
int main()
{
auto torque = 20.0q_Nm;
auto energy = 20.0q_J;
physical::Angle angle = torque/energy;
std::cout << angle <<'\n';
}