forked from mpusz/mp-units
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
23 lines
378 B
C++
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';
|
|
}
|
|
|