[removed] figure out point Y by angle and distance

前端 未结 2 1101
猫巷女王i
猫巷女王i 2021-02-19 01:37

In my project, I would like to draw a line from point X to point Y.

While I know the position of point X, I only know the angle and the distance of point Y.

So m

2条回答
  •  爱一瞬间的悲伤
    2021-02-19 02:12

    js> Math.cos(10*Math.PI/180) * 200 + 10
    206.9615506024416
    js> Math.sin(10*Math.PI/180) * 200 + 20
    54.729635533386066
    

    Y is at (207, 55).

提交回复
热议问题