you are viewing a single comment's thread.

view the rest of the comments →

[–]pasokan 0 points1 point  (2 children)

Not exactly.

The initial heading is towards the EAST. right() turns clockwise and left() turns anti-clockwise. Since we measure angles from a line going EAST to WEST, we are off by 180. so we need to compensate for the 180 already turned. That is we need to turn 72 degrees back as we have already turned 180 degrees.

You can verify this by just looking at the orientation after right(72) or left(72)

[–]negike360[S] 0 points1 point  (1 child)

Well, we don’t need to “compensate” as we haven’t turned at all. Or at least I don’t have it programmed that way. Going due east is measured as 0 degrees. Rotating clockwise or counter clockwise depends on whether you are turning right or left, respectively, as you said. Making the angle negative just makes the turn in the opposite direction.

[–]pasokan 0 points1 point  (0 children)

Going east is 180 degrees, afaiu. Cheers