Skip to content

Commit c2ea36b

Browse files
authored
Merge pull request cyberbotics#6569 from cyberbotics/sync-released-0c0e31c77
Merge released into master
2 parents 69681a9 + 006a6b7 commit c2ea36b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/reference/compass.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ Now if the [Compass](#compass) node is in *upright* position, meaning that its z
179179
double get_bearing_in_degrees() {
180180
const double *north = wb_compass_get_values(tag);
181181
double rad = atan2(north[1], north[0]);
182-
double bearing = (rad - 1.5708) / M_PI * 180.0;
182+
double bearing = (rad / M_PI) * 180.0;
183183
if (bearing < 0.0)
184184
bearing = bearing + 360.0;
185185
return bearing;

0 commit comments

Comments
 (0)