PES 2 - Gruppe 1 / Mbed 2 deprecated Robocode_Random

Dependencies:   mbed

Fork of Robocode by PES 2 - Gruppe 1

Revision:
121:af16ffc05593
Parent:
120:cdf7a6751f9e
Child:
124:573a18c2155f
--- a/source/Positioning.cpp	Fri May 12 15:20:45 2017 +0000
+++ b/source/Positioning.cpp	Fri May 12 15:38:01 2017 +0000
@@ -137,7 +137,7 @@
                 float offsetx = 11.5;
                 float offsety = 11;
 
-                current_coord.y = dist_r + sqrt(offsetx*offsetx+offsety*offsety)*cos((90-deg_r-atan(offsety-offsetx))/180.0f*(float)M_PI);
+                current_coord.y = dist_r + sqrt(offsetx*offsetx+offsety*offsety)*cos((90-deg_r-atan(offsety/offsetx))/180.0f*(float)M_PI);
 
 
             }
@@ -155,7 +155,7 @@
                 float offsetx = 11.5;
                 float offsety = 11;
 
-                current_coord.x = dist_r + sqrt(offsetx*offsetx+offsety*offsety)*cos((90-fabsf(deg_l)-atan(offsetx-offsety))/180.0f*(float)M_PI);
+                current_coord.x = dist_r + sqrt(offsetx*offsetx+offsety*offsety)*cos((90-fabsf(deg_l)-atan(offsetx/offsety))/180.0f*(float)M_PI);
 
 
             }