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
This commit is contained in:
Andy Little
2020-05-14 17:41:04 +01:00
committed by Mateusz Pusz
parent 51f3739e46
commit f281e417e2
5 changed files with 130 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
#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';
}