get-programming-with-go icon indicating copy to clipboard operation
get-programming-with-go copied to clipboard

why turn left is -direction.X

Open shaojunda opened this issue 5 years ago • 0 comments
trafficstars

https://github.com/nathany/get-programming-with-go/blob/master/lesson31/rover/rover.go#L58

the current position is (5,0), the current direction is (1, 0), According to the formula provided in the code after the left current direction to become to (0,-1). the current position becomes to (5, -1). Does this seem to turn right?

shaojunda avatar Jul 12 '20 18:07 shaojunda