aboutsummaryrefslogtreecommitdiffstats
path: root/geom.hpp
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2015-02-01 18:22:26 +0100
committerAlex Auvolat <alex.auvolat@ens.fr>2015-02-01 18:22:26 +0100
commit2ef7173d248f994e58d4fb2d54cf6563a9041632 (patch)
tree249627553c738453df2b4f843980bd65fc7674b0 /geom.hpp
parent92d18c25a2ff68e76bc268b3ad891c78e4cb58d7 (diff)
parent74fb9253d61e29cbe8dd0125cbbeda3069b096b5 (diff)
downloadRobotique-Projet-2ef7173d248f994e58d4fb2d54cf6563a9041632.tar.gz
Robotique-Projet-2ef7173d248f994e58d4fb2d54cf6563a9041632.zip
Merge branch 'master' of https://github.com/Alexis211/Robotique
Conflicts: geom.hpp
Diffstat (limited to 'geom.hpp')
-rw-r--r--geom.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/geom.hpp b/geom.hpp
index e69fb81..40d6813 100644
--- a/geom.hpp
+++ b/geom.hpp
@@ -13,6 +13,12 @@ inline double frand(double a, double b) {
return r * (b - a) + a;
}
+inline double canon_angle(double ref, double move_it){
+ while (ref>move_it) move_it += 2*M_PI;
+ while (move_it >= ref + 2*M_PI) move_it -= 2*M_PI;
+ return move_it ;
+}
+
struct vec {
double x, y;