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 authored and Mateusz Pusz committed 2020-05-20 21:34:04 +02:00
1 parent 51f3739e46
commit f281e417e2
5 files changed
+130

No files matched your search

+1
View File
@@ -35,6 +35,7 @@ add_example(capacitor_time_curve)
add_example(clcpp_response)
add_example(conversion_factor)
add_example(kalman_filter-alpha_beta_filter_example2)
add_example(experimental_angle)
conan_check_testing(linear_algebra)
add_example(linear_algebra)
+22
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';
}