Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of Robocode by
Diff: source/Positioning.cpp
- 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);
}
