為什么多了個n,把n去掉不行嗎
import?math def?move(x,?y,?step,?angle): ????nx?=?x?+?step?*?math.cos(angle) ????ny?=?y?-?step?*?math.sin(angle) ????return?nx,?ny
import?math def?move(x,?y,?step,?angle): ????nx?=?x?+?step?*?math.cos(angle) ????ny?=?y?-?step?*?math.sin(angle) ????return?nx,?ny
2018-06-25
舉報
2018-06-25
只是另用變量接收比較容易區分各自的作用,也可以使用原變量,這里是x,y單次使用,改變不改變不會影響后續使用,所以可以把n去掉