aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--geom.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/geom.hpp b/geom.hpp
index 06b9e65..62e9642 100644
--- a/geom.hpp
+++ b/geom.hpp
@@ -7,6 +7,12 @@
#define EPSILON 1e-6
#define abs(x) ((x)<0?-(x):(x))
+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;