forked from mpusz/mp-units
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:
committed by
Mateusz Pusz
parent
51f3739e46
commit
f281e417e2
22
example/experimental_angle.cpp
Normal file
22
example/experimental_angle.cpp
Normal 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';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user