用法:
turtle.setheading(to_angle)
turtle.seth(to_angle)
to_angle - 一個數字(整數或浮點數)
參數:
將 turtle 的方向設置為
to_angle
。以下是一些常見的度數方向:標準模式
標誌模式
0 - 東
0 - 北
90 - 北
90 - 東
180 - 西
180 - 南
270 - 南
270 - 西
>>> turtle.setheading(90) >>> turtle.heading() 90.0
相關用法
- Python turtle.seth()用法及代碼示例
- Python turtle.setworldcoordinates()用法及代碼示例
- Python turtle.setx()用法及代碼示例
- Python turtle.settiltangle()用法及代碼示例
- Python turtle.setup用法及代碼示例
- Python turtle.sety用法及代碼示例
- Python turtle.settiltangle用法及代碼示例
- Python turtle.setundobuffer()用法及代碼示例
- Python turtle.setx用法及代碼示例
- Python turtle.sety()用法及代碼示例
- Python turtle.setworldcoordinates用法及代碼示例
- Python turtle.speed()用法及代碼示例
- Python turtle.shapesize用法及代碼示例
- Python turtle.shape()用法及代碼示例
- Python turtle.screensize用法及代碼示例
- Python turtle.shape用法及代碼示例
- Python turtle.shapetransform()用法及代碼示例
- Python turtle.speed用法及代碼示例
- Python turtle.stamp用法及代碼示例
- Python turtle.showturtle()用法及代碼示例
注:本文由純淨天空篩選整理自python.org大神的英文原創作品 turtle.setheading。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。