Skip to content

Commit 9eae4e7

Browse files
authored
Merge pull request jdf#197 from msunardi/bugfix/transform2d_robot_example
Add ref to global variables. Fix indentation.
2 parents 3a0b383 + 2fe1dcc commit 9eae4e7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎Tutorials/transform2d/index.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ <h3>Case Study: Interactive Rotation</h3>
777777
adjusted to be relative to the robot's coordinate system
778778
instead of the window's coordinate system.
779779
"""
780-
780+
global leftArmAngle, rightArmAngle
781781
background(255)
782782
pushMatrix()
783783
translate(ROBOT_X, ROBOT_Y) # place robot so arms are always on screen
@@ -786,7 +786,7 @@ <h3>Case Study: Interactive Rotation</h3>
786786
mY = mouseY - ROBOT_Y
787787
if (mX &lt; MIDPOINT_X): # left side of robot
788788
leftArmAngle = atan2(mY - PIVOT_Y, mX - LEFT_PIVOT_X) - HALF_PI
789-
else:
789+
else:
790790
rightArmAngle = atan2(mY - PIVOT_Y, mX - RIGHT_PIVOT_X) - HALF_PI;
791791
drawRobot()
792792

0 commit comments

Comments
 (0)