Skip to content

Commit

Permalink
Merge pull request #6572 from cyberbotics/sync-master-c2ea36ba5
Browse files Browse the repository at this point in the history
Merge master into develop
  • Loading branch information
omichel authored Jul 2, 2024
2 parents 37d5deb + 92a6dc2 commit 608109c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/reference/compass.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ Now if the [Compass](#compass) node is in *upright* position, meaning that its z
double get_bearing_in_degrees() {
const double *north = wb_compass_get_values(tag);
double rad = atan2(north[1], north[0]);
double bearing = (rad - 1.5708) / M_PI * 180.0;
double bearing = (rad / M_PI) * 180.0;
if (bearing < 0.0)
bearing = bearing + 360.0;
return bearing;
Expand Down

0 comments on commit 608109c

Please sign in to comment.